public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5] iio: buffer: fix warning in requesting threaded irq
@ 2026-04-23  1:44 Junxiao Chang
  0 siblings, 0 replies; only message in thread
From: Junxiao Chang @ 2026-04-23  1:44 UTC (permalink / raw)
  To: jic23, dlechner, nuno.sa, andy, gye976, linux-iio, linux-kernel,
	lars, junxiao.chang

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.
Hardware: ARLs(Ultra 9 285) desktop
Software: Ubuntu 24.04 + v7.0-rc3 kernel.

WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x1639/0x2510, CPU#3: iio-sensor-prox/974
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

There is no threaded handler in thiggered buffer setup, e.g. vf610_adc
and hid-sensor. They might introduce this warning.

Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
---
V4 -> V5: remove Fixes tag and add back change log
V3 -> V4: remove unneeded backtrace log
V2 -> V3: remove unneeded log in git message
V1 -> V2: use ternary and drop temp variable

V3/V4: https://lore.kernel.org/linux-iio/20260421103807.7ca935e9@jic23-huawei/T/#t
V2: https://lore.kernel.org/linux-iio/20260418002334.3643504-1-junxiao.chang@intel.com/T/#mc0803722dce6585bbc8c9e0ec8289bd96afe99aa
V1: https://lore.kernel.org/linux-iio/20260418002334.3643504-1-junxiao.chang@intel.com/T/#mf0eba6c23049d15c2b43ea5528b5f5a47e216c58

 drivers/iio/buffer/industrialio-triggered-buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/buffer/industrialio-triggered-buffer.c b/drivers/iio/buffer/industrialio-triggered-buffer.c
index 9bf75dee7ff86..40eea3a447246 100644
--- a/drivers/iio/buffer/industrialio-triggered-buffer.c
+++ b/drivers/iio/buffer/industrialio-triggered-buffer.c
@@ -64,7 +64,7 @@ int iio_triggered_buffer_setup_ext(struct iio_dev *indio_dev,
 
 	indio_dev->pollfunc = iio_alloc_pollfunc(h,
 						 thread,
-						 IRQF_ONESHOT,
+						 thread ? IRQF_ONESHOT : 0,
 						 indio_dev,
 						 "%s_consumer%d",
 						 indio_dev->name,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-22  1:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23  1:44 [PATCH v5] iio: buffer: fix warning in requesting threaded irq Junxiao Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox