mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-acpi@vger.kernel.org, Borislav Petkov <bp@suse.de>,
	Chun-Yi Lee <joeyli.kernel@gmail.com>,
	Colin Ian King <colin.king@canonical.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Len Brown <lenb@kernel.org>,
	Linda Knippers <linda.knippers@hpe.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Tony Luck <tony.luck@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Zhang Rui <rui.zhang@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 4/6] ACPI-APEI-EINJ: Replace 12 seq_printf() calls by seq_puts() in available_error_type_show()
Date: Tue, 18 Apr 2017 18:54:26 +0200	[thread overview]
Message-ID: <31965286-0979-2489-367b-3d4819f4bdd1@users.sourceforge.net> (raw)
In-Reply-To: <077115e4-8ec3-9c6d-0374-8ffc5e0f85c0@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 18 Apr 2017 17:50:12 +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>
---
 drivers/acpi/apei/einj.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index ec50c32ea3da..b2bb7c764cdb 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -580,29 +580,30 @@ static int available_error_type_show(struct seq_file *m, void *v)
 	if (rc)
 		return rc;
 	if (available_error_type & 0x0001)
-		seq_printf(m, "0x00000001\tProcessor Correctable\n");
+		seq_puts(m, "0x00000001\tProcessor Correctable\n");
 	if (available_error_type & 0x0002)
-		seq_printf(m, "0x00000002\tProcessor Uncorrectable non-fatal\n");
+		seq_puts(m, "0x00000002\tProcessor Uncorrectable non-fatal\n");
 	if (available_error_type & 0x0004)
-		seq_printf(m, "0x00000004\tProcessor Uncorrectable fatal\n");
+		seq_puts(m, "0x00000004\tProcessor Uncorrectable fatal\n");
 	if (available_error_type & 0x0008)
-		seq_printf(m, "0x00000008\tMemory Correctable\n");
+		seq_puts(m, "0x00000008\tMemory Correctable\n");
 	if (available_error_type & 0x0010)
-		seq_printf(m, "0x00000010\tMemory Uncorrectable non-fatal\n");
+		seq_puts(m, "0x00000010\tMemory Uncorrectable non-fatal\n");
 	if (available_error_type & 0x0020)
-		seq_printf(m, "0x00000020\tMemory Uncorrectable fatal\n");
+		seq_puts(m, "0x00000020\tMemory Uncorrectable fatal\n");
 	if (available_error_type & 0x0040)
-		seq_printf(m, "0x00000040\tPCI Express Correctable\n");
+		seq_puts(m, "0x00000040\tPCI Express Correctable\n");
 	if (available_error_type & 0x0080)
-		seq_printf(m, "0x00000080\tPCI Express Uncorrectable non-fatal\n");
+		seq_puts(m,
+			 "0x00000080\tPCI Express Uncorrectable non-fatal\n");
 	if (available_error_type & 0x0100)
-		seq_printf(m, "0x00000100\tPCI Express Uncorrectable fatal\n");
+		seq_puts(m, "0x00000100\tPCI Express Uncorrectable fatal\n");
 	if (available_error_type & 0x0200)
-		seq_printf(m, "0x00000200\tPlatform Correctable\n");
+		seq_puts(m, "0x00000200\tPlatform Correctable\n");
 	if (available_error_type & 0x0400)
-		seq_printf(m, "0x00000400\tPlatform Uncorrectable non-fatal\n");
+		seq_puts(m, "0x00000400\tPlatform Uncorrectable non-fatal\n");
 	if (available_error_type & 0x0800)
-		seq_printf(m, "0x00000800\tPlatform Uncorrectable fatal\n");
+		seq_puts(m, "0x00000800\tPlatform Uncorrectable fatal\n");
 
 	return 0;
 }
-- 
2.12.2

  parent reply	other threads:[~2017-04-18 16:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 16:48 [PATCH 0/6] ACPI: Fine-tuning for some function implementations SF Markus Elfring
2017-04-18 16:50 ` [PATCH 1/6] ACPI-fan: Use devm_kcalloc() in acpi_fan_get_fps() SF Markus Elfring
2017-04-18 16:51 ` [PATCH 2/6] ACPI-fan: Delete error messages for a failed memory allocation in two functions SF Markus Elfring
2017-04-18 16:53 ` [PATCH 3/6] ACPI-nfit: Use devm_kcalloc() in nfit_mem_dcr_init() SF Markus Elfring
2017-04-18 16:54 ` SF Markus Elfring [this message]
2017-04-18 16:55 ` [PATCH 5/6] ACPI-battery: Replace 16 seq_printf() calls by seq_puts() SF Markus Elfring
2017-04-18 16:56 ` [PATCH 6/6] ACPI-proc: Replace two seq_printf() calls by seq_puts() in acpi_system_wakeup_device_seq_show() SF Markus Elfring

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=31965286-0979-2489-367b-3d4819f4bdd1@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=bp@suse.de \
    --cc=colin.king@canonical.com \
    --cc=dan.j.williams@intel.com \
    --cc=joeyli.kernel@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lenb@kernel.org \
    --cc=linda.knippers@hpe.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=tony.luck@intel.com \
    --cc=vishal.l.verma@intel.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