* [PATCH] locking/lockdep: Replace two seq_printf() calls by seq_puts() in print_name()
@ 2019-07-02 17:50 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2019-07-02 17:50 UTC (permalink / raw)
To: kernel-janitors, Ingo Molnar, Peter Zijlstra, Will Deacon; +Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 2 Jul 2019 19:45:26 +0200
A string which did not contain a data format specification 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>
---
kernel/locking/lockdep_proc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/lockdep_proc.c b/kernel/locking/lockdep_proc.c
index 9c49ec645d8b..5bc9187e6246 100644
--- a/kernel/locking/lockdep_proc.c
+++ b/kernel/locking/lockdep_proc.c
@@ -45,9 +45,9 @@ static void print_name(struct seq_file *m, struct lock_class *class)
if (!name) {
name = __get_key_name(class->key, str);
- seq_printf(m, "%s", name);
+ seq_puts(m, name);
} else{
- seq_printf(m, "%s", name);
+ seq_puts(m, name);
if (class->name_version > 1)
seq_printf(m, "#%d", class->name_version);
if (class->subclass)
--
2.22.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-02 17:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 17:50 [PATCH] locking/lockdep: Replace two seq_printf() calls by seq_puts() in print_name() Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).