drm/nouveau/debugfs: Replace five seq_printf() calls by seq_puts() in nouveau_debugfs...
authorMarkus Elfring <Markus.Elfring@web.de>
Sat, 15 Apr 2023 20:02:31 +0000 (22:02 +0200)
committerKarol Herbst <kherbst@redhat.com>
Mon, 17 Apr 2023 17:08:03 +0000 (19:08 +0200)
Five strings 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>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/bdee7e41-094a-91d1-3f6f-56df402d70b7@web.de
drivers/gpu/drm/nouveau/nouveau_debugfs.c

index 13c82ee..99d022a 100644 (file)
@@ -120,16 +120,16 @@ nouveau_debugfs_pstate_get(struct seq_file *m, void *data)
 
                if (state >= 0) {
                        if (info.ustate_ac == state)
-                               seq_printf(m, " AC");
+                               seq_puts(m, " AC");
                        if (info.ustate_dc == state)
-                               seq_printf(m, " DC");
+                               seq_puts(m, " DC");
                        if (info.pstate == state)
-                               seq_printf(m, " *");
+                               seq_puts(m, " *");
                } else {
                        if (info.ustate_ac < -1)
-                               seq_printf(m, " AC");
+                               seq_puts(m, " AC");
                        if (info.ustate_dc < -1)
-                               seq_printf(m, " DC");
+                               seq_puts(m, " DC");
                }
 
                seq_putc(m, '\n');