From: Stephen Warren <swarren@wwwdotorg.org>
To: Dong Aisheng <b29396@freescale.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linus.walleij@stericsson.com
Subject: Re: [PATCH v2 2/2] pinctrl: show pin name for pingroups in sysfs
Date: Tue, 17 Apr 2012 13:55:49 -0600 [thread overview]
Message-ID: <4F8DCAC5.6000706@wwwdotorg.org> (raw)
In-Reply-To: <1334646046-467-2-git-send-email-b29396@freescale.com>
On 04/17/2012 01:00 AM, Dong Aisheng wrote:
> From: Dong Aisheng <dong.aisheng@linaro.org>
>
> Pin name is more useful to users.
...
> @@ -964,10 +984,14 @@ static int pinctrl_groups_show(struct seq_file *s, void *what)
> seq_printf(s, "%s [ERROR GETTING PINS]\n",
> gname);
> else {
> - seq_printf(s, "group: %s, pins = [ ", gname);
> - for (i = 0; i < num_pins; i++)
> - seq_printf(s, "%d ", pins[i]);
> - seq_puts(s, "]\n");
> + seq_printf(s, "group: %s\n", gname);
> + for (i = 0; i < num_pins; i++) {
> + pname = pin_get_name(pctldev, pins[i]);
> + if (WARN_ON(!pname))
> + return -EINVAL;
The main issue I had here was that the loop should continue rather than
erroring out. Still, I suppose this condition "can't" happen, so perhaps
that isn't such a big deal after all. So:
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
> + seq_printf(s, "pin %d (%s)\n", pins[i], pname);
> + }
next prev parent reply other threads:[~2012-04-17 19:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 7:00 [PATCH v2 1/2] pinctrl: show pin name when request pins Dong Aisheng
2012-04-17 7:00 ` [PATCH v2 2/2] pinctrl: show pin name for pingroups in sysfs Dong Aisheng
2012-04-17 19:55 ` Stephen Warren [this message]
2012-04-18 11:41 ` Linus Walleij
2012-04-17 19:53 ` [PATCH v2 1/2] pinctrl: show pin name when request pins Stephen Warren
2012-04-18 11:38 ` 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=4F8DCAC5.6000706@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=b29396@freescale.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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