2018-01-13 16:26:34

by SF Markus Elfring

[permalink] [raw]
Subject: [PATCH] fs/proc: Use seq_putc() in show_console_dev()

From: Markus Elfring <[email protected]>
Date: Sat, 13 Jan 2018 17:17:59 +0100

A single character (line break) should be put into a sequence.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
---
fs/proc/consoles.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/proc/consoles.c b/fs/proc/consoles.c
index 290ba85cb900..a8ac48aebd59 100644
--- a/fs/proc/consoles.c
+++ b/fs/proc/consoles.c
@@ -55,8 +55,7 @@ static int show_console_dev(struct seq_file *m, void *v)
if (dev)
seq_printf(m, " %4d:%d", MAJOR(dev), MINOR(dev));

- seq_printf(m, "\n");
-
+ seq_putc(m, '\n');
return 0;
}

--
2.15.1