Skip to contentSkip to conversation

mpt3sas: tidy up output slightly

PATCH In review Dan Carpenter 2 participants 3 messages Mar 28, 2014 – May 2, 2014

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

PATCH 1/1 mpt3sas: tidy up output slightly

The indenting here for "pr_info("\n");" is not correct. It's not part of the if condition.

Also using pr_info() would put extra characters in the middle of the line. I suppose that people could complain that pr_cont() is racy but at least it's better than the original code.

drivers/scsi/mpt3sas/mpt3sas_base.c +2 -2
index 0cf4f70..aa0e042 100644
@@ -585,9 +585,9 @@ _base_display_event_data(struct MPT3SAS_ADAPTER *ioc,
 		    (event_data->ReasonCode = MPI2_EVENT_SAS_DISC_RC_STARTED) ?
 		    "start" : "stop");
 		if (event_data->DiscoveryStatus)
-			pr_info("discovery_status(0x%08x)",
+			pr_cont("discovery_status(0x%08x)",
 			    le32_to_cpu(event_data->DiscoveryStatus));
-			pr_info("\n");
+		pr_cont("\n");
 		return;
 	}
 	case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE:
#1 lore raw

Hi Nagalakshmi,

Welcome back from vacation. Please Ack this patch because output is still badly fromatted in linux-next.

regards,
dan carpenter

Quoted 25 lines · Dan Carpenter

The indenting here for "pr_info("\n");" is not correct. It's not part of the if condition.

Also using pr_info() would put extra characters in the middle of the line. I suppose that people could complain that pr_cont() is racy but at least it's better than the original code.

drivers/scsi/mpt3sas/mpt3sas_base.c +2 -2
index 0cf4f70..aa0e042 100644
@@ -585,9 +585,9 @@ _base_display_event_data(struct MPT3SAS_ADAPTER *ioc,
 		    (event_data->ReasonCode = MPI2_EVENT_SAS_DISC_RC_STARTED) ?
 		    "start" : "stop");
 		if (event_data->DiscoveryStatus)
-			pr_info("discovery_status(0x%08x)",
+			pr_cont("discovery_status(0x%08x)",
 			    le32_to_cpu(event_data->DiscoveryStatus));
-			pr_info("\n");
+		pr_cont("\n");
 		return;
 	}
 	case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE:
#2 lore raw
In reply to Dan Carpenter

James,

This patch seem to be fine. Please consider this patch.

Regards,
Sreekanth

Quoted 36 lines

-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Friday, March 28, 2014 2:09 PM
To: Nandigama, Nagalakshmi
Cc: Reddy, Sreekanth; Support; James E.J. Bottomley; DL-MPT Fusion Linux; [email protected]; [email protected]
Subject: [patch] [SCSI] mpt3sas: tidy up output slightly

The indenting here for "pr_info("\n");" is not correct. It's not part of the if condition.

Also using pr_info() would put extra characters in the middle of the line. I suppose that people could complain that pr_cont() is racy but at least it's better than the original code.

drivers/scsi/mpt3sas/mpt3sas_base.c +0 -0
index 0cf4f70..aa0e042 100644
@@ -585,9 +585,9 @@ _base_display_event_data(struct MPT3SAS_ADAPTER
 *ioc,
 		    (event_data->ReasonCode =

MPI2_EVENT_SAS_DISC_RC_STARTED) ?

		    "start" : "stop");
		if (event_data->DiscoveryStatus)
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -1
-			pr_info("discovery_status(0x%08x)",
+			pr_cont("discovery_status(0x%08x)",
			    le32_to_cpu(event_data->DiscoveryStatus));
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -1
-			pr_info("\n");
+		pr_cont("\n");
		return;
	}
	case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE: