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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 4 Mar 2021 12:13:04 +0100
From:   Álvaro Fernández Rojas <noltari@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Michael Walle <michael@...le.cc>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
        Jonas Gorski <jonas.gorski@...il.com>,
        Necip Fazil Yildiran <fazilyildiran@...il.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v4 05/15] pinctrl: add a pincontrol driver for BCM6328

Hi Andy,

> El 4 mar 2021, a las 11:49, Andy Shevchenko <andy.shevchenko@...il.com> escribió:
> 
> On Thu, Mar 4, 2021 at 10:57 AM Álvaro Fernández Rojas
> <noltari@...il.com> wrote:
>> 
>> Add a pincontrol driver for BCM6328. BCM628 supports muxing 32 pins as
>> GPIOs, as LEDs for the integrated LED controller, or various other
>> functions. Its pincontrol mux registers also control other aspects, like
>> switching the second USB port between host and device mode.
> 
> ...
> 
>> +static inline unsigned int bcm6328_mux_off(unsigned int pin)
>> +{
>> +       static const unsigned int bcm6328_mux[] = {
>> +               BCM6328_MUX_LO_REG,
>> +               BCM6328_MUX_HI_REG,
> 
>> +               BCM6328_MUX_OTHER_REG
> 
> When it's not terminator add a comma, otherwise remove a comma.

… so you want me to add a comma or not?

> 
> Also, why is it inside a function? It's anyway global and constant.

Because this is only used by this function and I’m used to doing this to comply with MISRA C 2004 at work :)

> 
>> +       };
> 
> ...
> 
>> +       regmap_update_bits(pc->regs, bcm6328_mux_off(pin),
>> +                          3UL << ((pin % 16) * 2),
> 
> 3UL => #define BLABLA  GENMASK(1, 0)

Ok, I will add a define for this.

> 
>> +                          mux << ((pin % 16) * 2));
> 
> ...
> 
>> +static const struct of_device_id bcm6328_pinctrl_match[] = {
>> +       { .compatible = "brcm,bcm6328-pinctrl", },
>> +       { },
> 
> No comma.

Ok, I will remove the comma.

> 
>> +};
> 
> Above comments to all your patches.

Ok, I will try to address all of this comments in v5.

> 
> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ