mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] module: Use seq_putc() in two functions
@ 2024-07-14 11:17 Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2024-07-14 11:17 UTC (permalink / raw)
  To: linux-modules, kernel-janitors, Luis Chamberlain; +Cc: LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 14 Jul 2024 13:13:15 +0200

Single characters should be put into a sequence.
Thus use the corresponding function “seq_putc”.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 kernel/module/procfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/module/procfs.c b/kernel/module/procfs.c
index 0a4841e88adb..dc91d3dba8f3 100644
--- a/kernel/module/procfs.c
+++ b/kernel/module/procfs.c
@@ -35,7 +35,7 @@ static inline void print_unload_info(struct seq_file *m, struct module *mod)
 	}

 	if (!printed_something)
-		seq_puts(m, "-");
+		seq_putc(m, '-');
 }
 #else /* !CONFIG_MODULE_UNLOAD */
 static inline void print_unload_info(struct seq_file *m, struct module *mod)
@@ -99,7 +99,7 @@ static int m_show(struct seq_file *m, void *p)
 	if (mod->taints)
 		seq_printf(m, " %s", module_flags(mod, buf, true));

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

--
2.45.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-14 11:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-14 11:17 [PATCH] module: Use seq_putc() in two functions Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®