[PATCH] locking/lockdep: Replace two seq_printf() calls by seq_puts() in print_name()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux