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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Apr 2017 18:54:26 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-acpi@...r.kernel.org, Borislav Petkov <bp@...e.de>,
        Chun-Yi Lee <joeyli.kernel@...il.com>,
        Colin Ian King <colin.king@...onical.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Len Brown <lenb@...nel.org>,
        Linda Knippers <linda.knippers@....com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Tony Luck <tony.luck@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>,
        Zhang Rui <rui.zhang@...el.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 4/6] ACPI-APEI-EINJ: Replace 12 seq_printf() calls by
 seq_puts() in available_error_type_show()

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ