mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Toshi Kani <toshi.kani@hpe.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/2] M32R-setup: Replace 16 seq_printf() calls by seq_puts() in show_cpuinfo()
Date: Sun, 23 Oct 2016 22:24:52 +0200	[thread overview]
Message-ID: <85f08303-4584-ea4c-4977-2cb5f3e08d13@users.sourceforge.net> (raw)
In-Reply-To: <fef662e1-b5b4-127e-9427-a98ffb512a82@users.sourceforge.net>

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

      parent reply	other threads:[~2016-10-23 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-23 20:22 [PATCH 0/2] M32R-setup: Fine-tuning for show_cpuinfo() SF Markus Elfring
2016-10-23 20:23 ` [PATCH 1/2] M32R-setup: Use seq_putc() in show_cpuinfo() SF Markus Elfring
2016-10-23 20:24 ` SF Markus Elfring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85f08303-4584-ea4c-4977-2cb5f3e08d13@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=toshi.kani@hpe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome