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]
Message-id: <20161125010241epcms1p7e0f70a92e15d61ec80ef4112f81d16cc@epcms1p7>
Date:   Fri, 25 Nov 2016 01:02:41 +0000
From:   Jongman Heo <jongman.heo@...sung.com>
To:     linux-kernel@...r.kernel.org 
        <linux-kernel@...r.kernel.org>
Subject: mptbase: fix printk output using pr_cont


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");
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ