Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1625463
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/6] ACPI-APEI-EINJ: Replace 12 seq_printf() calls by seq_puts() in available_error_type_show() |
| Date | 2017-04-18 19:00 +0200 |
| Message-ID | <txEDV-8uq-21@gated-at.bofh.it> (permalink) |
| References | <txEue-8r4-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] ACPI: Fine-tuning for some function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-18 18:50 +0200 [PATCH 6/6] ACPI-proc: Replace two seq_printf() calls by seq_puts() in acpi_system_wakeup_device_seq_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-18 19:00 +0200 [PATCH 2/6] ACPI-fan: Delete error messages for a failed memory allocation in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-18 19:00 +0200 [PATCH 5/6] ACPI-battery: Replace 16 seq_printf() calls by seq_puts() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-18 19:00 +0200 [PATCH 1/6] ACPI-fan: Use devm_kcalloc() in acpi_fan_get_fps() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-18 19:00 +0200 [PATCH 4/6] ACPI-APEI-EINJ: Replace 12 seq_printf() calls by seq_puts() in available_error_type_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-18 19:00 +0200 [PATCH 3/6] ACPI-nfit: Use devm_kcalloc() in nfit_mem_dcr_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-18 19:00 +0200
csiph-web