linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-gpio@vger.kernel.org,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 5/5] pinctrl: mvebu: Use seq_putc() in mvebu_pinconf_group_dbg_show()
Date: Thu, 12 Jan 2017 17:37:48 +0100	[thread overview]
Message-ID: <c35b1329-a197-c20c-dc3a-2fa8af2e2f35@users.sourceforge.net> (raw)
In-Reply-To: <12880bc6-1695-074a-788b-dd936f6f795a@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 12 Jan 2017 17:12:30 +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>
---
 drivers/pinctrl/mvebu/pinctrl-mvebu.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 5dc29ba128c4..ff314aa823e7 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -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, " ]");
-- 
2.11.0

  parent reply	other threads:[~2017-01-12 16:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 16:30 [PATCH 0/5] pinctrl-mvebu: Fine-tuning for four function implementations SF Markus Elfring
2017-01-12 16:31 ` [PATCH 1/5] pinctrl: mvebu: Use kmalloc_array() in mvebu_pinctrl_dt_node_to_map() SF Markus Elfring
2017-01-17 14:54   ` Linus Walleij
2017-01-12 16:33 ` [PATCH 2/5] pinctrl: mvebu: Delete an error message for a failed memory allocation in three functions SF Markus Elfring
2017-01-17 14:54   ` Linus Walleij
2017-01-12 16:34 ` [PATCH 3/5] pinctrl: mvebu: Delete an unnecessary return statement in mvebu_pinconf_group_dbg_show() SF Markus Elfring
2017-01-17 14:55   ` Linus Walleij
2017-01-12 16:36 ` [PATCH 4/5] pinctrl: mvebu: Use seq_puts() " SF Markus Elfring
2017-01-17 14:56   ` Linus Walleij
2017-01-12 16:37 ` SF Markus Elfring [this message]
2017-01-17 14:57   ` [PATCH 5/5] pinctrl: mvebu: Use seq_putc() " Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c35b1329-a197-c20c-dc3a-2fa8af2e2f35@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).