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]
Date:   Wed, 12 May 2021 13:42:21 +0200
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Bamvor Jian Zhang <bamv2005@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v1 1/1] gpio: mockup: Switch to use gpiochip_get_desc()

On Mon, May 10, 2021 at 9:52 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> Switch to use gpiochip_get_desc() helper.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/gpio/gpio-mockup.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c
> index d7e73876a3b9..0a9d746a0fe0 100644
> --- a/drivers/gpio/gpio-mockup.c
> +++ b/drivers/gpio/gpio-mockup.c
> @@ -144,12 +144,9 @@ static void gpio_mockup_set_multiple(struct gpio_chip *gc,
>  static int gpio_mockup_apply_pull(struct gpio_mockup_chip *chip,
>                                   unsigned int offset, int value)
>  {
> +       struct gpio_chip *gc = &chip->gc;
> +       struct gpio_desc *desc = gpiochip_get_desc(gc, offset);
>         int curr, irq, irq_type, ret = 0;
> -       struct gpio_desc *desc;
> -       struct gpio_chip *gc;
> -
> -       gc = &chip->gc;
> -       desc = &gc->gpiodev->descs[offset];
>
>         mutex_lock(&chip->lock);
>
> @@ -369,7 +366,7 @@ static void gpio_mockup_debugfs_setup(struct device *dev,
>
>                 priv->chip = chip;
>                 priv->offset = i;
> -               priv->desc = &gc->gpiodev->descs[i];
> +               priv->desc = gpiochip_get_desc(gc, i);
>
>                 debugfs_create_file(name, 0200, chip->dbg_dir, priv,
>                                     &gpio_mockup_debugfs_ops);
> --
> 2.30.2
>

Patch applied, thanks!

Bartosz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ