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]
Message-ID: <CAHp75VfO2xc3RU1brxUnj5bXg4xid76YiwGJBwwwS+665GO-2Q@mail.gmail.com>
Date:   Wed, 31 Aug 2022 23:54:45 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Martyn Welch <martyn.welch@...labora.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Collabora Kernel ML <kernel@...labora.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/5] gpio: pca953x: Fix pca953x_gpio_set_pull_up_down()

On Mon, Aug 29, 2022 at 4:43 PM Martyn Welch <martyn.welch@...labora.com> wrote:
>
> A previous fix (dc87f6dd058a gpio: pca953x: Fix pca953x_gpio_set_config)

Format is wrong. Please read documentation on how to refer to the
commits in the tree.

> identified that pinconf_to_config_param() needed to be used to isolate
> the config_param from the pinconf in pca953x_gpio_set_config(). This fix
> however did not consider that this would also be needed in
> pca953x_gpio_set_pull_up_down() to which it passes this config.
>
> Perform a similar call in pca953x_gpio_set_pull_up_down() to isolate the
> configuration parameter there as well, rather than passing it from
> pca953x_gpio_set_config() as the configuration argument may also be needed
> in pca953x_gpio_set_pull_up_down() at a later date.

...

>         u8 pull_en_reg = pca953x_recalc_addr(chip, PCAL953X_PULL_EN, offset);
>         u8 pull_sel_reg = pca953x_recalc_addr(chip, PCAL953X_PULL_SEL, offset);
>         u8 bit = BIT(offset % BANK_SZ);

> +       enum pin_config_param param = pinconf_to_config_param(config);

I would move it up before the u8 variable.

The code looks good otherwise.
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>

Thanks for fixing this!

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ