lkml.org 
[lkml]   [2017]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 4/6] ACPI-APEI-EINJ: Replace 12 seq_printf() calls by seq_puts() in available_error_type_show()
From
Date
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
\
 
 \ /
  Last update: 2017-04-18 18:55    [W:0.053 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site