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: <CAHp75Vcc3CNXguMK-ZhRfvfjVBQBbcGEYK_+WQAmb_Sw5-Derw@mail.gmail.com>
Date:   Wed, 31 Mar 2021 15:29:02 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Matthias Schiffer <matthias.schiffer@...tq-group.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Lee Jones <lee.jones@...aro.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] gpio: tqmx86: really make IRQ optional

On Wed, Mar 31, 2021 at 2:37 PM Matthias Schiffer
<matthias.schiffer@...tq-group.com> wrote:
>
> The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This
> causes warnings with newer kernels.
>
> Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a
> missing IRQ properly.

...

> -       irq = platform_get_irq(pdev, 0);
> -       if (irq < 0)
> +       irq = platform_get_irq_optional(pdev, 0);

> +       if (irq < 0 && irq != -ENXIO)
>                 return irq;

This is a dead code now. I suggest you to do the opposite, i.e.
if (irq < 0)
  irq = 0;

In such a case below change is not required.

...

> -       if (irq) {
> +       if (irq > 0) {
>                 struct irq_chip *irq_chip = &gpio->irq_chip;
>                 u8 irq_status;


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ