Re: [tip: irq/core] genirq: Warn about using IRQF_ONESHOT without a threaded handler
From: David Lechner
Date: Sun Mar 01 2026 - 18:57:51 EST
On 3/1/26 5:17 PM, David Lechner wrote:
> On 2/7/26 9:42 AM, Jonathan Cameron wrote:
>> On Tue, 03 Feb 2026 09:29:25 -0800
>> srinivas pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:
>>
>>> On Tue, 2026-02-03 at 09:38 +0100, Sebastian Andrzej Siewior wrote:
>>>> On 2026-02-03 00:27:40 [+0100], Bert Karwatzki wrote:
>>>>>
>>>>> The warning appears because iio_triggered_buffer_setup_ext() (in
>>>>> drivers/iio/buffer/industrialio-triggered-buffer.c) is called with
>>>>> thread = NULL
>>>>> during the probe of the iio device and calls iio_alloc_pollfunc()
>>>>> (in drivers/iio/industrialio-trigger.c) with thread = NULL and type
>>>>> = IRQF_ONESHOT.
>
>
> I noticed this while testing hid-sensor-rotation.
>
...
>
> I saw that Jonathan mentioned some other more thorough approaches in
> a later reply, but here is the "quick fix" I came up with.
>
I later found [1] that has an alternate fix, so no need to reply
about my "solution" here.
[1]: https://lore.kernel.org/linux-iio/20260220224514.471348-1-srinivas.pandruvada@xxxxxxxxxxxxxxx/