From: Markus Elfring <[email protected]>
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 <[email protected]>
---
 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

Reply via email to