From: Jacky Huang <ychuang570808@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, p.zabel@pengutronix.de,
j.neuschaefer@gmx.net, linux-arm-kernel@lists.infradead.org,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, ychuang3@nuvoton.com,
schung@nuvoton.com
Subject: Re: [PATCH v3 4/4] pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver
Date: Mon, 29 Jan 2024 10:09:57 +0800 [thread overview]
Message-ID: <1aff21ed-c185-4d23-8260-fa182a592d15@gmail.com> (raw)
In-Reply-To: <CACRpkdYi-y9zWAR71rQOtKVJOuGgE4n8Q47YXZW=Pt345UWDkw@mail.gmail.com>
Dear Linus,
Thanks for your review.
On 2024/1/28 下午 11:49, Linus Walleij wrote:
> Hi Jacky,
>
> thanks for your patch!
>
> this caught my eye:
>
> On Tue, Jan 23, 2024 at 9:06 AM Jacky Huang <ychuang570808@gmail.com> wrote:
>
>> From: Jacky Huang <ychuang3@nuvoton.com>
>>
>> Add common pinctrl and GPIO driver for Nuvoton MA35 series SoC, and
>> add support for ma35d1 pinctrl.
>>
>> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
> (...)
>
>> + if (ma35_pinconf_get_power_source(npctl, pin) == MVOLT_1800) {
>> + for (i = 0; i < sizeof(ds_1800mv_tbl) / sizeof(u32); i++) {
> Isn't this equivalent to:
>
> for (i = 0; i < ARRAY_SIZE(ds_1800mv_tbl; i++) {
>
>> + if (ds_1800mv_tbl[i] == strength)
>> + ds_val = i;
>> + }
>> + } else {
>> + for (i = 0; i < sizeof(ds_3300mv_tbl) / sizeof(u32); i++) {
> Dito
>
> Perhaps more cases, pls check!
>
> Yours,
> Linus Walleij
Yes, I will use ARRAY_SIZE instead.
Best Regards,
Jacky Huang
next prev parent reply other threads:[~2024-01-29 2:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 8:06 [PATCH v3 0/4] Add support for nuvoton ma35d1 pin control Jacky Huang
2024-01-23 8:06 ` [PATCH v3 1/4] dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node Jacky Huang
2024-01-23 8:06 ` [PATCH v3 2/4] dt-bindings: pinctrl: Document nuvoton ma35d1 pin control Jacky Huang
2024-01-25 10:49 ` Krzysztof Kozlowski
2024-01-23 8:06 ` [PATCH v3 3/4] arm64: dts: nuvoton: Add pinctrl support for ma35d1 Jacky Huang
2024-01-23 8:06 ` [PATCH v3 4/4] pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver Jacky Huang
2024-01-27 23:21 ` kernel test robot
2024-01-28 5:34 ` kernel test robot
2024-01-28 6:38 ` kernel test robot
2024-01-28 7:52 ` Christophe JAILLET
2024-01-29 2:05 ` Jacky Huang
2024-01-28 15:49 ` Linus Walleij
2024-01-29 2:09 ` Jacky Huang [this message]
2024-01-29 1:45 ` kernel test robot
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=1aff21ed-c185-4d23-8260-fa182a592d15@gmail.com \
--to=ychuang570808@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=j.neuschaefer@gmx.net \
--cc=krzysztof.kozlowski+dt@linaro.org \
--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=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=schung@nuvoton.com \
--cc=ychuang3@nuvoton.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).