RE: [PATCH] [SCSI] bfa: fix missing { } braces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Colin,
  We will fix the indentation in the next set of patches that we submit upstream.

Thanks,
Anil

-----Original Message-----
From: Colin King [mailto:colin.king@xxxxxxxxxxxxx] 
Sent: 03 August 2015 20:05
To: Anil Gurumurthy; Sudarsana Kalluru; James E.J. Bottomley; linux-scsi
Cc: linux-kernel
Subject: [PATCH] [SCSI] bfa: fix missing { } braces

From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Static analysis by smatch indicated that there was a curly braces issue:

drivers/scsi/bfa/bfa_ioc.c:3668 bfa_cb_sfp_state_query()
        warn: curly braces intended?
drivers/scsi/bfa/bfa_ioc.c:3671 bfa_cb_sfp_state_query()
        warn: inconsistent indenting
drivers/scsi/bfa/bfa_ioc.c:3676 bfa_cb_sfp_state_query()
        warn: curly braces intended?

The fix matches the intended logic based on the original indentation layout of the code.

Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
 drivers/scsi/bfa/bfa_ioc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 315d6d6..59c3492 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -3662,7 +3662,7 @@ bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp)
 	bfa_trc(sfp, sfp->portspeed);
 	if (sfp->media) {
 		bfa_sfp_media_get(sfp);
-		if (sfp->state_query_cbfn)
+		if (sfp->state_query_cbfn) {
 			sfp->state_query_cbfn(sfp->state_query_cbarg,
 					sfp->status);
 			sfp->media = NULL;
@@ -3670,14 +3670,16 @@ bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp)
 
 		if (sfp->portspeed) {
 			sfp->status = bfa_sfp_speed_valid(sfp, sfp->portspeed);
-			if (sfp->state_query_cbfn)
+			if (sfp->state_query_cbfn) {
 				sfp->state_query_cbfn(sfp->state_query_cbarg,
 						sfp->status);
 				sfp->portspeed = BFA_PORT_SPEED_UNKNOWN;
+			}
 		}
 
 		sfp->state_query_lock = 0;
 		sfp->state_query_cbfn = NULL;
+	}
 }
 
 /*
--
2.5.0

<<attachment: winmail.dat>>


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux