Skip to contentSkip to conversation

module: tracking: Extend format string of a seq_printf() call in unloaded_tainted_modules_seq_show()

PATCH New Markus Elfring 1 participant 1 message Jul 14, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 module: tracking: Extend format string of a seq_printf() call in unloaded_tainted_modules_seq_show()

From: Markus Elfring <[email protected]>
Date: Sun, 14 Jul 2024 13:43:06 +0200
Subject: [PATCH] module: tracking: Extend format string of a seq_printf() call in unloaded_tainted_modules_seq_show()

* Move the specification of a single line break from a seq_puts() call into the format string of a previous seq_printf() call.

* Omit an extra call of the function “seq_puts”
because of this refactoring.

This issue was detected by using the Coccinelle software.

---
 kernel/module/tracking.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/module/tracking.c +1 -3
index 16742d1c630c..9f84271c23b3 100644
@@ -94,9 +94,7 @@ static int unloaded_tainted_modules_seq_show(struct seq_file *m, void *p)
 	l = module_flags_taint(mod_taint->taints, buf);
 	buf[l++] = '\0';
 
-	seq_printf(m, "%s (%s) %llu", mod_taint->name, buf, mod_taint->count);
-	seq_puts(m, "\n");
-
+	seq_printf(m, "%s (%s) %llu\n", mod_taint->name, buf, mod_taint->count);
 	return 0;
 }
 

--
2.45.2