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-prev] [day] [month] [year] [list]
Date:   Sun, 23 Oct 2016 22:24:52 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Ingo Molnar <mingo@...nel.org>,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>,
        Toshi Kani <toshi.kani@....com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 2/2] M32R-setup: Replace 16 seq_printf() calls by seq_puts()
 in show_cpuinfo()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 23 Oct 2016 22:04:34 +0200

Strings which did not contain data format specifications should be put
into a sequence. Thus use the corresponding function "seq_puts".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 arch/m32r/kernel/setup.c | 50 +++++++++++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 22 deletions(-)

diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c
index 92cbe92..2eac3b2 100644
--- a/arch/m32r/kernel/setup.c
+++ b/arch/m32r/kernel/setup.c
@@ -302,47 +302,53 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 	seq_printf(m, "processor\t: %ld\n", cpu);
 
 #if defined(CONFIG_CHIP_VDEC2)
-	seq_printf(m, "cpu family\t: VDEC2\n"
-		"cache size\t: Unknown\n");
+	seq_puts(m,
+		 "cpu family\t: VDEC2\n"
+		 "cache size\t: Unknown\n");
 #elif defined(CONFIG_CHIP_M32700)
-	seq_printf(m,"cpu family\t: M32700\n"
-		"cache size\t: I-8KB/D-8KB\n");
+	seq_puts(m,
+		 "cpu family\t: M32700\n"
+		 "cache size\t: I-8KB/D-8KB\n");
 #elif defined(CONFIG_CHIP_M32102)
-	seq_printf(m,"cpu family\t: M32102\n"
-		"cache size\t: I-8KB\n");
+	seq_puts(m,
+		 "cpu family\t: M32102\n"
+		 "cache size\t: I-8KB\n");
 #elif defined(CONFIG_CHIP_OPSP)
-	seq_printf(m,"cpu family\t: OPSP\n"
-		"cache size\t: I-8KB/D-8KB\n");
+	seq_puts(m,
+		 "cpu family\t: OPSP\n"
+		 "cache size\t: I-8KB/D-8KB\n");
 #elif defined(CONFIG_CHIP_MP)
-	seq_printf(m, "cpu family\t: M32R-MP\n"
-		"cache size\t: I-xxKB/D-xxKB\n");
+	seq_puts(m,
+		 "cpu family\t: M32R-MP\n"
+		 "cache size\t: I-xxKB/D-xxKB\n");
 #elif  defined(CONFIG_CHIP_M32104)
-	seq_printf(m,"cpu family\t: M32104\n"
-		"cache size\t: I-8KB/D-8KB\n");
+	seq_puts(m,
+		 "cpu family\t: M32104\n"
+		 "cache size\t: I-8KB/D-8KB\n");
 #else
-	seq_printf(m, "cpu family\t: Unknown\n");
+	seq_puts(m, "cpu family\t: Unknown\n");
 #endif
 	seq_printf(m, "bogomips\t: %lu.%02lu\n",
 		c->loops_per_jiffy/(500000/HZ),
 		(c->loops_per_jiffy/(5000/HZ)) % 100);
 #if defined(CONFIG_PLAT_MAPPI)
-	seq_printf(m, "Machine\t\t: Mappi Evaluation board\n");
+	seq_puts(m, "Machine\t\t: Mappi Evaluation board\n");
 #elif defined(CONFIG_PLAT_MAPPI2)
-	seq_printf(m, "Machine\t\t: Mappi-II Evaluation board\n");
+	seq_puts(m, "Machine\t\t: Mappi-II Evaluation board\n");
 #elif defined(CONFIG_PLAT_MAPPI3)
-	seq_printf(m, "Machine\t\t: Mappi-III Evaluation board\n");
+	seq_puts(m, "Machine\t\t: Mappi-III Evaluation board\n");
 #elif defined(CONFIG_PLAT_M32700UT)
-	seq_printf(m, "Machine\t\t: M32700UT Evaluation board\n");
+	seq_puts(m, "Machine\t\t: M32700UT Evaluation board\n");
 #elif defined(CONFIG_PLAT_OPSPUT)
-	seq_printf(m, "Machine\t\t: OPSPUT Evaluation board\n");
+	seq_puts(m, "Machine\t\t: OPSPUT Evaluation board\n");
 #elif defined(CONFIG_PLAT_USRV)
-	seq_printf(m, "Machine\t\t: uServer\n");
+	seq_puts(m, "Machine\t\t: uServer\n");
 #elif defined(CONFIG_PLAT_OAKS32R)
-	seq_printf(m, "Machine\t\t: OAKS32R\n");
+	seq_puts(m, "Machine\t\t: OAKS32R\n");
 #elif  defined(CONFIG_PLAT_M32104UT)
-	seq_printf(m, "Machine\t\t: M3T-M32104UT uT Engine board\n");
+	seq_puts(m, "Machine\t\t: M3T-M32104UT uT Engine board\n");
 #else
-	seq_printf(m, "Machine\t\t: Unknown\n");
+	seq_puts(m, "Machine\t\t: Unknown\n");
 #endif
 
 #define PRINT_CLOCK(name, value)				\
-- 
2.10.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ