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: <CAMpxmJWHH7-40Gc5RCyRMq5v-_Ew8-B_CgrJmZQgtq2N6F5JEA@mail.gmail.com>
Date:   Wed, 2 Jun 2021 15:35:02 +0200
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Serge Semin <Sergey.Semin@...kalelectronics.ru>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Hoan Tran <hoan@...amperecomputing.com>,
        Serge Semin <fancer.lancer@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode_irq_get()

On Tue, Jun 1, 2021 at 6:21 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> We have open coded variant of fwnode_irq_get() in dwapb_get_irq().
> Replace it with a simple call.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/gpio/gpio-dwapb.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> index 939701c1465e..7d61f5821e32 100644
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -528,17 +528,13 @@ static int dwapb_gpio_add_port(struct dwapb_gpio *gpio,
>  static void dwapb_get_irq(struct device *dev, struct fwnode_handle *fwnode,
>                           struct dwapb_port_property *pp)
>  {
> -       struct device_node *np = NULL;
> -       int irq = -ENXIO, j;
> -
> -       if (fwnode_property_read_bool(fwnode, "interrupt-controller"))
> -               np = to_of_node(fwnode);
> +       int irq, j;
>
>         for (j = 0; j < pp->ngpio; j++) {
> -               if (np)
> -                       irq = of_irq_get(np, j);
> -               else if (has_acpi_companion(dev))
> +               if (has_acpi_companion(dev))
>                         irq = platform_get_irq_optional(to_platform_device(dev), j);
> +               else
> +                       irq = fwnode_irq_get(fwnode, j);
>                 if (irq > 0)
>                         pp->irq[j] = irq;
>         }
> --
> 2.30.2
>

Applied, thanks!

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ