Skip to contentSkip to conversation

unicore32/kernel/setup: Use seq_puts() in c_show()

PATCH New SF Markus Elfring 1 participant 1 message May 7, 2017 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 unicore32/kernel/setup: Use seq_puts() in c_show()

From: Markus Elfring <[email protected]>
Date: Sun, 7 May 2017 20:15:41 +0200

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

This issue was detected by using the Coccinelle software.

---
 arch/unicore32/kernel/setup.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
arch/unicore32/kernel/setup.c +8 -11
index c2bffa5614a4..345464ce35f5 100644
@@ -316,18 +316,15 @@ static int c_show(struct seq_file *m, void *v)
 	seq_puts(m, "Features\t: CMOV UC-F64");
 
 	seq_printf(m, "\nCPU implementer\t: 0x%02x\n", uc32_cpuid >> 24);
-	seq_printf(m, "CPU architecture: 2\n");
+	seq_puts(m, "CPU architecture: 2\n");
 	seq_printf(m, "CPU revision\t: %d\n", (uc32_cpuid >> 16) & 15);
-
-	seq_printf(m, "Cache type\t: write-back\n"
-			"Cache clean\t: cp0 c5 ops\n"
-			"Cache lockdown\t: not support\n"
-			"Cache format\t: Harvard\n");
-
-	seq_puts(m, "\n");
-
-	seq_printf(m, "Hardware\t: PKUnity v3\n");
-
+	seq_puts(m,
+		 "Cache type\t: write-back\n"
+		 "Cache clean\t: cp0 c5 ops\n"
+		 "Cache lockdown\t: not support\n"
+		 "Cache format\t: Harvard\n"
+		 "\n"
+		 "Hardware\t: PKUnity v3\n");
 	return 0;
 }
 
Signature · 1 line
2.12.2