lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1aff21ed-c185-4d23-8260-fa182a592d15@gmail.com>
Date: Mon, 29 Jan 2024 10:09:57 +0800
From: Jacky Huang <ychuang570808@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
 conor+dt@...nel.org, p.zabel@...gutronix.de, j.neuschaefer@....net,
 linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 ychuang3@...oton.com, schung@...oton.com
Subject: Re: [PATCH v3 4/4] pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO
 driver

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@...il.com> wrote:
>
>> From: Jacky Huang <ychuang3@...oton.com>
>>
>> Add common pinctrl and GPIO driver for Nuvoton MA35 series SoC, and
>> add support for ma35d1 pinctrl.
>>
>> Signed-off-by: Jacky Huang <ychuang3@...oton.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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ