pinctrl: mvebu: Use seq_putc() in mvebu_pinconf_group_dbg_show()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 12 Jan 2017 16:12:30 +0000 (17:12 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 17 Jan 2017 14:57:19 +0000 (15:57 +0100)
Single characters should be put into a sequence.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mvebu/pinctrl-mvebu.c

index 5dc29ba128c48ab8431a38095141f0e44b8ed88f..ff314aa823e72e025a478a30a4625bd39cda5b8b 100644 (file)
@@ -188,12 +188,12 @@ static void mvebu_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
                if (curr->subname)
                        seq_printf(s, "(%s)", curr->subname);
                if (curr->flags & (MVEBU_SETTING_GPO | MVEBU_SETTING_GPI)) {
-                       seq_printf(s, "(");
+                       seq_putc(s, '(');
                        if (curr->flags & MVEBU_SETTING_GPI)
-                               seq_printf(s, "i");
+                               seq_putc(s, 'i');
                        if (curr->flags & MVEBU_SETTING_GPO)
-                               seq_printf(s, "o");
-                       seq_printf(s, ")");
+                               seq_putc(s, 'o');
+                       seq_putc(s, ')');
                }
        } else {
                seq_puts(s, "current: UNKNOWN");
@@ -215,12 +215,12 @@ static void mvebu_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
                                seq_printf(s, "(%s)", grp->settings[n].subname);
                        if (grp->settings[n].flags &
                                (MVEBU_SETTING_GPO | MVEBU_SETTING_GPI)) {
-                               seq_printf(s, "(");
+                               seq_putc(s, '(');
                                if (grp->settings[n].flags & MVEBU_SETTING_GPI)
-                                       seq_printf(s, "i");
+                                       seq_putc(s, 'i');
                                if (grp->settings[n].flags & MVEBU_SETTING_GPO)
-                                       seq_printf(s, "o");
-                               seq_printf(s, ")");
+                                       seq_putc(s, 'o');
+                               seq_putc(s, ')');
                        }
                }
                seq_puts(s, " ]");