[PATCH 2/2] M32R-setup: Replace 16 seq_printf() calls by seq_puts() in show_cpuinfo()

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

 



From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
 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

--
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