Re: [PATCH v2] iio: buffer: fix warning in requesting threaded irq

From: Andy Shevchenko

Date: Fri Apr 17 2026 - 07:31:42 EST


On Sat, Apr 18, 2026 at 04:51:56PM +0800, Junxiao Chang wrote:
> IRQF_ONESHOT is for threaded IRQ. If there is no threaded IRQ
> handler, this flag should not be set.
>
> This change fixes a warning during booting with kernel v7.0-rc3:
>
> WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x1639/0x2510, CPU#3: iio-sensor-prox/974

> RIP: 0010:__setup_irq+0x1639/0x2510

Unneeded line (it dups the previous one).

> Call Trace:
> request_threaded_irq+0x2c7/0x490
> iio_trigger_attach_poll_func+0x353/0x6b0
> __iio_update_buffers+0x2420/0x2c70
> enable_store+0x183/0x270
> dev_attr_store+0x5e/0x90

> sysfs_kf_write+0x1e8/0x290
> kernfs_fop_write_iter+0x406/0x5f0
> vfs_write+0x71c/0xea0

These 3 lines are also redundant.

> v2: using ternary and drop temp variable

Changelog should go...

> Fixes: 23f2d735a932 ("iio: Add helper function for initializing triggered buffers")
> Signed-off-by: Junxiao Chang <junxiao.chang@xxxxxxxxx>
> ---

...here, when it doesn't go to the commit message. One may find this in the
lore archive.

...

Code wise now it looks good.

--
With Best Regards,
Andy Shevchenko