Thread (8 messages) 8 messages, 4 authors, 2022-02-14

Re: [PATCH v2 1/2] platform: make platform_get_irq_optional() optional

From: Uwe Kleine-König <hidden>
Date: 2022-02-14 14:02:07
Also in: alsa-devel, kvm, linux-gpio, linux-i2c, linux-iio, linux-mediatek, linux-mmc, linux-phy, linux-pm, linux-pwm, linux-renesas-soc, linux-serial, linux-spi, lkml, platform-driver-x86

Hello Geert,

On Mon, Feb 14, 2022 at 10:01:14AM +0100, Geert Uytterhoeven wrote:
Also IMHO, the dummy value handling is a red herring.  Contrary to
optional clocks and resets, a missing optional interrupt does not
always mean there is nothing to do: in case of polling, something
else must definitely be done. 
Note this is exactly why I don't like this change. I'd even go so far
and claim that "a missing optional interrupt hardly ever means there is
nothing to do".
So even if request_irq() would accept a dummy interrupt zero and just
do nothing, it would give the false impression that that is all there
is to do, while an actual check for zero with polling code handling
may still need to be present, thus leading to more not less bugs.
Yes, a dummy irq value will just not be possible.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help