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


Groups > linux.kernel > #1466934

[PATCH 7/7] aacraid: Apply another recommendation from "checkpatch.pl"

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 7/7] aacraid: Apply another recommendation from "checkpatch.pl"
Date 2016-08-21 09:40 +0200
Message-ID <s8vwl-5Qk-3@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: Sun, 21 Aug 2016 08:23:25 +0200

The script "checkpatch.pl" can point out that assignments should usually
not be performed within condition checks.
Thus move the assignment for the variable "srbfib" to a separate statement.

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

diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index d2029db..7e6c76d 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -499,9 +499,9 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
 	/*
 	 *	Allocate and initialize a Fib then setup a SRB command
 	 */
-	if (!(srbfib = aac_fib_alloc(dev))) {
+	srbfib = aac_fib_alloc(dev);
+	if (!srbfib)
 		return -ENOMEM;
-	}
 	aac_fib_init(srbfib);
 	/* raw_srb FIB is not FastResponseCapable */
 	srbfib->hw_fib_va->header.XferState &= ~cpu_to_le32(FastResponseCapable);
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious 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