Thread (20 messages) 20 messages, 3 authors, 2021-06-27

Re: [PATCH 1/3] gpio: tqmx86: really make IRQ optional

From: Andy Shevchenko <hidden>
Date: 2021-03-31 14:04:14
Also in: lkml

On Wed, Mar 31, 2021 at 4:36 PM Matthias Schiffer
[off-list ref] wrote:
On Wed, 2021-03-31 at 15:39 +0300, Andy Shevchenko wrote:
quoted
On Wed, Mar 31, 2021 at 3:37 PM Matthias Schiffer
[off-list ref] wrote:
quoted
On Wed, 2021-03-31 at 15:29 +0300, Andy Shevchenko wrote:
...
quoted
quoted
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.

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help