linux-kernel.vger.kernel.org archive mirror
 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: [PATCH 1/3] gpio: tqmx86: really make IRQ optional
Date: Thu, 24 Jun 2021 15:44:38 +0200	[thread overview]
Message-ID: <53e222fdbb3d488a99bb24d0205b064d3fe662b0.camel@ew.tq-group.com> (raw)
In-Reply-To: <CAHp75VcuD49UgkXCrPL3VKiOsx4qSDsf=zB2vp6yVS1aJCuc2w@mail.gmail.com>

On Wed, 2021-03-31 at 17:03 +0300, Andy Shevchenko wrote:
> On Wed, Mar 31, 2021 at 4:36 PM Matthias Schiffer
> <matthias.schiffer@ew.tq-group.com> wrote:
> > 
> > On Wed, 2021-03-31 at 15:39 +0300, Andy Shevchenko wrote:
> > > On Wed, Mar 31, 2021 at 3:37 PM Matthias Schiffer
> > > <matthias.schiffer@ew.tq-group.com> wrote:
> > > > On Wed, 2021-03-31 at 15:29 +0300, Andy Shevchenko wrote:
> 
> ...
> 
> > > > 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.
> > > 
> > > platform_get_irq() AFAIK won't ever return such a code.
> > > So, basically your conditional is always false.
> > > 
> > > I would like to see the code path which makes my comment wrong.
> > > 
> > 
> > EPROBE_DEFER appears a few times in platform_get_irq_optional()
> > (drivers/base/platform.c), but it's possible that this is only relevant
> > for OF-based platforms and not x86.
> 
> Ah, okay, that's something I haven't paid attention to.
> 
> So the root cause of the your case is platform_get_irq_optional|()
> return code. I'm wondering why it can't return 0 instead of absent
> IRQ? Perhaps you need to fix it instead of lurking into each caller.
> 


Hi Andy,

what's the plan here? "driver core: platform: Make
platform_get_irq_optional() optional" had to be reverted because it
broke existing users of platform_get_irq_optional(). I'm not convinced
that a slightly more convenient API is worth going through the trouble
of fixing them all - I know we don't care much about out-of-tree
modules, but subtly changing the behaviour of such a function doesn't
seem like a good idea to me even if we review all in-tree users.

Should I just rebase my patches with the existing ENXIO handing (and
fix up the other issues that were noted), or do you intend to give the
platform_get_irq_optional() revamp another try?

Kind regards,
Matthias


  reply	other threads:[~2021-06-24 13:51 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     ` (EXT) " Matthias Schiffer
2021-03-31 12:39       ` Andy Shevchenko
2021-03-31 13:36         ` Matthias Schiffer
2021-03-31 14:03           ` Andy Shevchenko
2021-06-24 13:44             ` Matthias Schiffer [this message]
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=53e222fdbb3d488a99bb24d0205b064d3fe662b0.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;
as well as URLs for NNTP newsgroup(s).