From: Chen-Yu Tsai <wenst@chromium.org>
To: Joe Perches <joe@perches.com>
Cc: Sean Wang <sean.wang@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v2 05/11] pinctrl: mediatek: paris: Drop extra newline in mtk_pctrl_show_one_pin()
Date: Thu, 10 Mar 2022 11:37:06 +0800 [thread overview]
Message-ID: <CAGXv+5F7pQt28m7wjS22io-MF=ms-HAWOSGC2iMz8cX=zhd1wg@mail.gmail.com> (raw)
In-Reply-To: <400cf2fc8cbc3887a90f50709f40adc0662ec0f4.camel@perches.com>
On Thu, Mar 10, 2022 at 4:01 AM Joe Perches <joe@perches.com> wrote:
>
> On Tue, 2022-03-08 at 18:09 +0800, Chen-Yu Tsai wrote:
> > The caller of mtk_pctrl_show_one_pin() is responsible for printing the
> > full line. mtk_pctrl_show_one_pin(), called through mtk_pctrl_dbg_show(),
> > should only produce a string containing the extra information the driver
> > wants included.
>
> Does this function have another caller?
>
> It looks as if this function doesn't need to be EXPORT_SYMBOL_GPL
> and could just be declared static in the file instead.
Judging from the commit history, I suspect there might have been plans
for using this in another module?
I can do a patch to make it static until that ever happens.
> btw: using %1d is mostly senseless as a control, but has some
> documentary use as a value < 0 or >= 10 will be always be
> fully emitted anyway.
Ack. But we could just leave it be.
Regards
ChenYu
> > diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
> []
> > @@ -634,14 +634,10 @@ ssize_t mtk_pctrl_show_one_pin(struct mtk_pinctrl *hw,
> > pullen,
> > pullup);
> >
> > - if (r1 != -1) {
> > - len += scnprintf(buf + len, buf_len - len, " (%1d %1d)\n",
> > - r1, r0);
> > - } else if (rsel != -1) {
> > - len += scnprintf(buf + len, buf_len - len, " (%1d)\n", rsel);
> > - } else {
> > - len += scnprintf(buf + len, buf_len - len, "\n");
> > - }
> > + if (r1 != -1)
> > + len += scnprintf(buf + len, buf_len - len, " (%1d %1d)", r1, r0);
> > + else if (rsel != -1)
> > + len += scnprintf(buf + len, buf_len - len, " (%1d)", rsel);
> >
> > return len;
> > }
>
>
next prev parent reply other threads:[~2022-03-10 3:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 10:09 [PATCH v2 00/11] pinctrl: mediatek: Fixes and minor improvements Chen-Yu Tsai
2022-03-08 10:09 ` [PATCH v2 01/11] pinctrl: pinconf-generic: Print arguments for bias-pull-* Chen-Yu Tsai
2022-03-08 10:09 ` [PATCH v2 02/11] pinctrl: mediatek: paris: Fix PIN_CONFIG_BIAS_* readback Chen-Yu Tsai
2022-03-08 15:27 ` AngeloGioacchino Del Regno
2022-03-08 10:09 ` [PATCH v2 03/11] pinctrl: mediatek: paris: Fix "argument" argument type for mtk_pinconf_get() Chen-Yu Tsai
2022-03-08 10:09 ` [PATCH v2 04/11] pinctrl: mediatek: paris: Fix pingroup pin config state readback Chen-Yu Tsai
2022-03-08 10:09 ` [PATCH v2 05/11] pinctrl: mediatek: paris: Drop extra newline in mtk_pctrl_show_one_pin() Chen-Yu Tsai
2022-03-09 20:01 ` Joe Perches
2022-03-10 3:37 ` Chen-Yu Tsai [this message]
2022-03-08 10:09 ` [PATCH v2 06/11] pinctrl: mediatek: paris: Skip custom extra pin config dump for virtual GPIOs Chen-Yu Tsai
2022-03-08 10:09 ` [PATCH v2 07/11] pinctrl: mediatek: paris: Rework mtk_pinconf_{get,set} switch/case logic Chen-Yu Tsai
2022-03-08 15:27 ` AngeloGioacchino Del Regno
2022-03-08 10:09 ` [PATCH v2 08/11] pinctrl: mediatek: paris: Support generic PIN_CONFIG_DRIVE_STRENGTH_UA Chen-Yu Tsai
2022-03-08 15:27 ` AngeloGioacchino Del Regno
2022-03-08 10:09 ` [PATCH v2 09/11] pinctrl: mediatek: pinctrl-moore: Simplify with dev_err_probe() Chen-Yu Tsai
2022-03-08 10:09 ` [PATCH v2 10/11] pinctrl: mediatek: pinctrl-paris: " Chen-Yu Tsai
2022-03-08 10:09 ` [PATCH v2 11/11] pinctrl: mediatek: pinctrl-mtk-common: " Chen-Yu Tsai
2022-03-15 0:24 ` [PATCH v2 00/11] pinctrl: mediatek: Fixes and minor improvements 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='CAGXv+5F7pQt28m7wjS22io-MF=ms-HAWOSGC2iMz8cX=zhd1wg@mail.gmail.com' \
--to=wenst@chromium.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=joe@perches.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=sean.wang@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;
as well as URLs for NNTP newsgroup(s).