Skip to contentSkip to conversation

iio: buffer: fix warning in requesting threaded irq

PATCH In review Junxiao Chang 2 participants 3 messages Apr 21 – Apr 22 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: buffer: fix warning in requesting threaded irq

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.

Fixes 23f2d735a932 ("iio: Add helper function for initializing triggered buffers")
---
 drivers/iio/buffer/industrialio-triggered-buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/buffer/industrialio-triggered-buffer.c +1 -1
index 9bf75dee7ff86..40eea3a447246 100644
@@ -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,
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 3 lines · On Wed, 22 Apr 2026 08:50:38 +0800 Junxiao Chang <[email protected]>…

IRQF_ONESHOT is for threaded IRQ. If there is no threaded IRQ handler, this flag should not be set.

See the guidance in
https://www.kernel.org/doc/Documentation/process/submitting-patches.rst
on how to mark new versions and do change logs etc as this isn't even close which makes it very hard to track. As such I'll not merge this version. Please send a v4 (?) Maybe it's gone past that already with all the rules about change logs and patch titles followed.

Quoted 12 lines

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
Quoted 4 lines

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

Fixes 23f2d735a932 ("iio: Add helper function for initializing triggered buffers")

This is a complex fix to tag as until recently it was harmless. All we actually have is a warning that says the combination in non sensical that was added recently.

Jonathan

Quoted 18 lines
---
 drivers/iio/buffer/industrialio-triggered-buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/buffer/industrialio-triggered-buffer.c +1 -1
index 9bf75dee7ff86..40eea3a447246 100644
@@ -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 lore raw
Quoted 8 lines

Jonathan Cameron <[email protected]> wrote:
See the guidance in
https://www.kernel.org/doc/Documentation/process/submitting-patches.rst
on how to mark new versions and do change logs etc as this isn't even close which makes it very hard to track. As such I'll not merge this version. Please send a v4 (?) Maybe it's gone past that already with all the rules about change logs and patch titles followed.

I will append change log at the end of commit message according to guidance you shared.

Quoted 4 lines

This is a complex fix to tag as until recently it was harmless.
All we actually have is a warning that says the combination in non sensical that was added recently.

I see, I will remove "Fixed" tag and send updated patch soon, thank you!