[PATCH 4/6] ACPI-APEI-EINJ: Replace 12 seq_printf() calls by seq_puts() in available_error_type_show()

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

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux