mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Lee Jones <lee.jones@linaro.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: (EXT) Re: [PATCH 1/3] gpio: tqmx86: really make IRQ optional
Date: Wed, 31 Mar 2021 14:36:59 +0200	[thread overview]
Message-ID: <4c143c8ee65fe52840ccbb4e1b422b6e473563d9.camel@ew.tq-group.com> (raw)
In-Reply-To: <CAHp75Vcc3CNXguMK-ZhRfvfjVBQBbcGEYK_+WQAmb_Sw5-Derw@mail.gmail.com>

On Wed, 2021-03-31 at 15:29 +0300, Andy Shevchenko wrote:
> On Wed, Mar 31, 2021 at 2:37 PM Matthias Schiffer
> <matthias.schiffer@ew.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;

I don't understand which part of the code is dead now. I assume the
`return irq` case is still useful for unexpected errors, or things like
EPROBE_DEFER? I'm not sure if EPROBE_DEFER is relevant for this driver,
but just ignoring the error code completely doesn't seem right to me.



> 
> 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;
> 
> 


  reply	other threads:[~2021-03-31 12:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 11:35 [PATCH 0/3] tqmx86: TQMxE40M support Matthias Schiffer
2021-03-31 11:35 ` [PATCH 1/3] gpio: tqmx86: really make IRQ optional Matthias Schiffer
2021-03-31 12:29   ` Andy Shevchenko
2021-03-31 12:36     ` Matthias Schiffer [this message]
2021-03-31 12:39       ` (EXT) " Andy Shevchenko
2021-03-31 13:36         ` Matthias Schiffer
2021-03-31 14:03           ` Andy Shevchenko
2021-06-24 13:44             ` Matthias Schiffer
2021-06-27  9:23               ` Andy Shevchenko
2021-03-31 12:30   ` Andy Shevchenko
2021-03-31 11:35 ` [PATCH 2/3] mfd: tqmx86: clear GPIO IRQ resource when no IRQ is set Matthias Schiffer
2021-03-31 12:35   ` Andy Shevchenko
2021-03-31 13:24     ` Matthias Schiffer
2021-03-31 14:10       ` Andy Shevchenko
2021-03-31 11:35 ` [PATCH 3/3] mfd: tqmx86: add support for TQMxE40M Matthias Schiffer
2021-03-31 12:37   ` Andy Shevchenko
2021-03-31 13:33     ` Matthias Schiffer
2021-03-31 14:11       ` Andy Shevchenko
2021-04-01  8:04         ` Lee Jones
2021-04-01  8:06           ` Matthias Schiffer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c143c8ee65fe52840ccbb4e1b422b6e473563d9.camel@ew.tq-group.com \
    --to=matthias.schiffer@ew.tq-group.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®