Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1466931

[PATCH 3/7] aacraid: Delete unnecessary initialisations in aac_send_raw_srb()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 3/7] aacraid: Delete unnecessary initialisations in aac_send_raw_srb()
Date 2016-08-21 09:30 +0200
Message-ID <s8vmF-5Nj-7@gated-at.bofh.it> (permalink)
References <qEuGl-43C-5@gated-at.bofh.it> <s8vcZ-5ID-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 20 Aug 2016 21:25:20 +0200

Six local variables will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/scsi/aacraid/commctrl.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index 6dcdf91..49a664f 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -476,20 +476,20 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
 {
 	struct fib* srbfib;
 	int status;
-	struct aac_srb *srbcmd = NULL;
-	struct user_aac_srb *user_srbcmd = NULL;
+	struct aac_srb *srbcmd;
+	struct user_aac_srb *user_srbcmd;
 	struct user_aac_srb __user *user_srb = arg;
 	struct aac_srb_reply __user *user_reply;
 	struct aac_srb_reply* reply;
-	u32 fibsize = 0;
-	u32 flags = 0;
+	u32 fibsize;
+	u32 flags;
 	s32 rcode = 0;
 	u32 data_dir;
 	void __user *sg_user[32];
 	void *sg_list[32];
 	u32 sg_indx = 0;
-	u32 byte_count = 0;
-	u32 actual_fibsize64, actual_fibsize = 0;
+	u32 byte_count;
+	u32 actual_fibsize64, actual_fibsize;
 	int i;
 
 
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] aacraid: Fine-tuning for a few functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:20 +0200
  [PATCH 5/7] aacraid: Add spaces after control flow keywords SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200
  [PATCH 4/7] aacraid: Delete unnecessary braces SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200
  [PATCH 2/7] aacraid: One function call less in aac_send_raw_srb()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200
  [PATCH 3/7] aacraid: Delete unnecessary initialisations in  aac_send_raw_srb() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200
  [PATCH 6/7] aacraid: Improve determination of a few sizes SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200
  [PATCH 7/7] aacraid: Apply another recommendation from  "checkpatch.pl" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:40 +0200

csiph-web