Skip to contentSkip to conversation

gpiolib: acpi: Add missing IRQF_ONESHOT

PATCH In review Yang Li 3 participants 5 messages Feb 23, 2021 – Mar 1, 2021

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 gpiolib: acpi: Add missing IRQF_ONESHOT

fixed the following coccicheck:
./drivers/gpio/gpiolib-acpi.c:176:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT

---
 drivers/gpio/gpiolib-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib-acpi.c +1 -1
index e37a57d..86efa2d 100644
@@ -174,7 +174,7 @@ static void acpi_gpiochip_request_irq(struct acpi_gpio_chip *acpi_gpio,
 	int ret, value;
 
 	ret = request_threaded_irq(event->irq, NULL, event->handler,
-				   event->irqflags, "ACPI:Event", event);
+				   event->irqflags | IRQF_ONESHOT, "ACPI:Event", event);
 	if (ret) {
 		dev_err(acpi_gpio->chip->parent,
 			"Failed to setup interrupt handler for %d\n",
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Yang Li

fixed the following coccicheck:
./drivers/gpio/gpiolib-acpi.c:176:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT

Quoted 22 lines
---
 drivers/gpio/gpiolib-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib-acpi.c +1 -1
index e37a57d..86efa2d 100644
@@ -174,7 +174,7 @@ static void acpi_gpiochip_request_irq(struct acpi_gpio_chip *acpi_gpio,
 	int ret, value;
 
 	ret = request_threaded_irq(event->irq, NULL, event->handler,
-				   event->irqflags, "ACPI:Event", event);
+				   event->irqflags | IRQF_ONESHOT, "ACPI:Event", event);
 	if (ret) {
 		dev_err(acpi_gpio->chip->parent,
 			"Failed to setup interrupt handler for %d\n",
Signature · 1 line
1.8.3.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 9 lines · Andy Shevchenko
Quoted 6 lines · Yang Li

fixed the following coccicheck:
./drivers/gpio/gpiolib-acpi.c:176:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT

Bart, I guess I will collect this in my branch and send you a PR. I have more fixes to that file anyway.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 10 lines · Andy Shevchenko
Quoted 8 lines · Andy Shevchenko
Quoted 6 lines · Yang Li

fixed the following coccicheck:
./drivers/gpio/gpiolib-acpi.c:176:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT

Quoted 10 lines
Quoted 1 line

Bart, I guess I will collect this in my branch and send you a PR. I have more fixes to that file anyway.

--
With Best Regards,
Andy Shevchenko

Fine with me!

#4 lore raw
Quoted 11 lines · Bartosz Golaszewski
Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Andy Shevchenko
Quoted 6 lines · Yang Li

fixed the following coccicheck:
./drivers/gpio/gpiolib-acpi.c:176:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Bart, I guess I will collect this in my branch and send you a PR. I have more fixes to that file anyway.

Fine with me!

Good! So, when you have time, please review [1] and I'll send PR for fixes.

[1]: https://lore.kernel.org/linux-gpio/[email protected]/T/#u

Signature · 2 lines
With Best Regards,
Andy Shevchenko