clk: Use seq_puts() in possible_parent_show()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 1 Jul 2019 20:20:40 +0000 (22:20 +0200)
committerStephen Boyd <sboyd@kernel.org>
Thu, 8 Aug 2019 15:03:17 +0000 (08:03 -0700)
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>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk.c

index 991fb3a62bda0aeb1bcabdb4edd11f0bef91d491..b6f50db759a48f588656b2156bd0f2861d73893a 100644 (file)
@@ -3021,15 +3021,15 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core,
         */
        parent = clk_core_get_parent_by_index(core, i);
        if (parent)
-               seq_printf(s, "%s", parent->name);
+               seq_puts(s, parent->name);
        else if (core->parents[i].name)
-               seq_printf(s, "%s", core->parents[i].name);
+               seq_puts(s, core->parents[i].name);
        else if (core->parents[i].fw_name)
                seq_printf(s, "<%s>(fw)", core->parents[i].fw_name);
        else if (core->parents[i].index >= 0)
-               seq_printf(s, "%s",
-                          of_clk_get_parent_name(core->of_node,
-                                                 core->parents[i].index));
+               seq_puts(s,
+                        of_clk_get_parent_name(core->of_node,
+                                               core->parents[i].index));
        else
                seq_puts(s, "(missing)");