Skip to contentSkip to conversation

mpt3sas: add missing curly braces

PATCH In review Dan Carpenter 2 participants 2 messages May 12, 2016 – May 13, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mpt3sas: add missing curly braces

There are some missing curly braces on this if statement, so we end up printing when we shouldn't.

Fixes a470a51cd648 ('mpt3sas: Handle active cable exception event')
drivers/scsi/mpt3sas/mpt3sas_scsih.c +2 -1
index 6a4df5a..6bff13e 100644
@@ -7975,13 +7975,14 @@ mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index,
 		ActiveCableEventData  		    (Mpi26EventDataActiveCableExcept_t *) mpi_reply->EventData;
 		if (ActiveCableEventData->ReasonCode =
-				MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER)
+				MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER) {
 			pr_info(MPT3SAS_FMT "Currently an active cable with ReceptacleID %d",
 			    ioc->name, ActiveCableEventData->ReceptacleID);
 			pr_info("cannot be powered and devices connected to this active cable");
 			pr_info("will not be seen. This active cable");
 			pr_info("requires %d mW of power",
 			    ActiveCableEventData->ActiveCablePowerRequirement);
+		}
 		break;
 
 	default: /* ignore the rest */
#1 lore raw

Hi,
Please consider this patch as Ack-by: Chaitra P B
<[email protected]>

Thanks,
Chaitra

-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Friday, May 13, 2016 2:08 AM
To: Sathya Prakash; Chaitra P B
Cc: Suganath Prabu Subramani; James E.J. Bottomley; Martin K. Petersen; [email protected]; [email protected]; [email protected]
Subject: [patch 1/2] mpt3sas: add missing curly braces

There are some missing curly braces on this if statement, so we end up printing when we shouldn't.

Fixes a470a51cd648 ('mpt3sas: Handle active cable exception event')
(quoted diff) +0 -0

b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 6a4df5a..6bff13e 100644

drivers/scsi/mpt3sas/mpt3sas_scsih.c +0 -0
@@ -7975,13 +7975,14 @@ mpt3sas_scsih_event_callback(struct

MPT3SAS_ADAPTER *ioc, u8 msix_index,
ActiveCableEventData =
(Mpi26EventDataActiveCableExcept_t *)
mpi_reply->EventData;
if (ActiveCableEventData->ReasonCode ==
-
MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER)
+
MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER) {
pr_info(MPT3SAS_FMT "Currently an active cable
with ReceptacleID %d",
ioc->name,
ActiveCableEventData->ReceptacleID);
pr_info("cannot be powered and devices connected
to this active cable");
pr_info("will not be seen. This active cable"); pr_info("requires %d mW of power",

ActiveCableEventData->ActiveCablePowerRequirement);
+ }
break;

default: /* ignore the rest */