lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon,  3 Aug 2015 15:35:27 +0100
From:	Colin King <colin.king@...onical.com>
To:	Anil Gurumurthy <anil.gurumurthy@...gic.com>,
	Sudarsana Kalluru <sudarsana.kalluru@...gic.com>,
	"James E.J. Bottomley" <JBottomley@...n.com>,
	linux-scsi@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] [SCSI] bfa: fix missing { } braces

From: Colin Ian King <colin.king@...onical.com>

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@...onical.com>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ