RE: [PATCH 1/2] scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event()

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

 



Thanks.

Acked-by: Sathya Prakash Veerichetty <sathya.prakash@xxxxxxxxxxxx>

-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
Sent: Wednesday, November 8, 2017 1:38 AM
To: Sathya Prakash; Suganath Prabu Subramani
Cc: Chaitra P B; James E.J. Bottomley; Martin K. Petersen;
MPT-FusionLinux.pdl@xxxxxxxxxxxx; linux-scsi@xxxxxxxxxxxxxxx;
kernel-janitors@xxxxxxxxxxxxxxx
Subject: [PATCH 1/2] scsi: mpt3sas: cleanup
_scsih_pcie_enumeration_event()

The indenting wasn't right, because the last two prints weren't indented
far enough.  Also it used pr_info() where it was supposed to use
pr_cont().  I reversed the if statement and pulled the code in one tab and
did a couple other minor cleanups.

Fixes: 4318c7347847 ("scsi: mpt3sas: Handle NVMe PCIe device related
events generated from firmware.")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 3a9438a1704e..93b45e618edb 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -7700,17 +7700,18 @@ _scsih_pcie_enumeration_event(struct
MPT3SAS_ADAPTER *ioc,
 	Mpi26EventDataPCIeEnumeration_t *event_data =
 		(Mpi26EventDataPCIeEnumeration_t *)fw_event->event_data;

-	if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) {
-		pr_info(MPT3SAS_FMT "pcie enumeration event: (%s) Flag
0x%02x",
-			ioc->name,
-			((event_data->ReasonCode ==
-			MPI26_EVENT_PCIE_ENUM_RC_STARTED) ?
-			"started" : "completed"), event_data->Flags);
+	if (!(ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK))
+		return;
+
+	pr_info(MPT3SAS_FMT "pcie enumeration event: (%s) Flag 0x%02x",
+		ioc->name,
+		(event_data->ReasonCode ==
MPI26_EVENT_PCIE_ENUM_RC_STARTED) ?
+			"started" : "completed",
+		event_data->Flags);
 	if (event_data->EnumerationStatus)
-		pr_info("enumeration_status(0x%08x)",
-		    le32_to_cpu(event_data->EnumerationStatus));
-	pr_info("\n");
-	}
+		pr_cont("enumeration_status(0x%08x)",
+			le32_to_cpu(event_data->EnumerationStatus));
+	pr_cont("\n");
 }

 /**
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux