All of lore.kernel.org
 help / color / mirror / Atom feed
* mptbase: fix printk output using pr_cont
       [not found] <CGME20161125010241epcms1p7e0f70a92e15d61ec80ef4112f81d16cc@epcms1p7>
@ 2016-11-25  1:02 ` Jongman Heo
  2016-11-25 11:34   ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Jongman Heo @ 2016-11-25  1:02 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]


With current linus git, Fusion MPT driver prints out unnecessary new lines.

[    2.090255] Fusion MPT base driver 3.04.20
[    2.090257] Copyright (c) 1999-2008 LSI Corporation
[    2.090262] Fusion MPT SPI Host driver 3.04.20
[    2.090979] mptbase: ioc0: Initiating bringup
[    2.196306] ioc0: 
[    2.196310] LSI53C1030 B0: 
[    2.196312] Capabilities={
[    2.196313] Initiator
[    2.196314] }


I modified set of printk()s to pr_cont to fix the problem.
Not sure if it's correct, but now I can see the message as previous.

[    2.404271] Fusion MPT base driver 3.04.20
[    2.404274] Copyright (c) 1999-2008 LSI Corporation
[    2.404279] Fusion MPT SPI Host driver 3.04.20
[    2.405037] mptbase: ioc0: Initiating bringup
[    2.509568] ioc0: LSI53C1030 B0: Capabilities={Initiator}


diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 89c7ed1..0d434de 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -2866,23 +2866,23 @@ MptDisplayIocCapabilities(MPT_ADAPTER *ioc)
 {
 	int i = 0;
 
-	printk(KERN_INFO "%s: ", ioc->name);
+	pr_cont(KERN_INFO "%s: ", ioc->name);
 	if (ioc->prod_name)
-		printk("%s: ", ioc->prod_name);
-	printk("Capabilities={");
+		pr_cont("%s: ", ioc->prod_name);
+	pr_cont("Capabilities={");
 
 	if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_INITIATOR) {
-		printk("Initiator");
+		pr_cont("Initiator");
 		i++;
 	}
 
 	if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_TARGET) {
-		printk("%sTarget", i ? "," : "");
+		pr_cont("%sTarget", i ? "," : "");
 		i++;
 	}
 
 	if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) {
-		printk("%sLAN", i ? "," : "");
+		pr_cont("%sLAN", i ? "," : "");
 		i++;
 	}
 
@@ -2891,12 +2891,11 @@ MptDisplayIocCapabilities(MPT_ADAPTER *ioc)
 	 *  This would probably evoke more questions than it's worth
 	 */
 	if (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_TARGET) {
-		printk("%sLogBusAddr", i ? "," : "");
+		pr_cont("%sLogBusAddr", i ? "," : "");
 		i++;
 	}
 #endif
-
-	printk("}\n");
+	pr_cont("}\n");
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: mptbase: fix printk output using pr_cont
  2016-11-25  1:02 ` mptbase: fix printk output using pr_cont Jongman Heo
@ 2016-11-25 11:34   ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2016-11-25 11:34 UTC (permalink / raw)
  To: jongman.heo, linux-kernel@vger.kernel.org

On Fri, 2016-11-25 at 01:02 +0000, Jongman Heo wrote:
> With current linus git, Fusion MPT driver prints out unnecessary new lines.
> 
> [    2.090255] Fusion MPT base driver 3.04.20
> [    2.090257] Copyright (c) 1999-2008 LSI Corporation
> [    2.090262] Fusion MPT SPI Host driver 3.04.20
> [    2.090979] mptbase: ioc0: Initiating bringup
> [    2.196306] ioc0: 
> [    2.196310] LSI53C1030 B0: 
> [    2.196312] Capabilities={
> [    2.196313] Initiator
> [    2.196314] }
> 
> 
> I modified set of printk()s to pr_cont to fix the problem.
> Not sure if it's correct, but now I can see the message as previous.
[]
> diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
[]
> @@ -2866,23 +2866,23 @@ MptDisplayIocCapabilities(MPT_ADAPTER *ioc)
>  {
>  	int i = 0;
>  
> -	printk(KERN_INFO "%s: ", ioc->name);
> +	pr_cont(KERN_INFO "%s: ", ioc->name);

This is not s correct conversion.
This can either stay as printk(KERN_INFO
or be converted to pr_info

	pr_info("%s: ", ioc->name);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-25 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20161125010241epcms1p7e0f70a92e15d61ec80ef4112f81d16cc@epcms1p7>
2016-11-25  1:02 ` mptbase: fix printk output using pr_cont Jongman Heo
2016-11-25 11:34   ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.