Skip to contentSkip to conversation

i2c: imx: Clean up a call to request_irq()

PATCH Applied Dan Carpenter 4 participants 5 messages Jul 25, 2023 – Aug 14, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: imx: Clean up a call to request_irq()

This is passing a NULL thread to request_threaded_irq(). So it's not really a threaded IRQ at all. It's more readable to call request_irq() instead.

---
 drivers/i2c/busses/i2c-imx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/i2c/busses/i2c-imx.c +1 -2
index 65128a73e8a3..c0cac5bcfdd1 100644
@@ -1506,8 +1506,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
 		goto rpm_disable;
 
 	/* Request IRQ */
-	ret = request_threaded_irq(irq, i2c_imx_isr, NULL, IRQF_SHARED,
-				   pdev->name, i2c_imx);
+	ret = request_irq(irq, i2c_imx_isr, IRQF_SHARED, pdev->name, i2c_imx);
 	if (ret) {
 		dev_err(&pdev->dev, "can't claim irq %d\n", irq);
 		goto rpm_disable;
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw

Hello Dan,

Quoted 14 lines · Dan Carpenter

This is passing a NULL thread to request_threaded_irq(). So it's not really a threaded IRQ at all. It's more readable to call request_irq() instead.

---
 drivers/i2c/busses/i2c-imx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/i2c/busses/i2c-imx.c +0 -0
index 65128a73e8a3..c0cac5bcfdd1 100644

drivers/i2c/busses/i2c-imx.c static int i2c_imx_probe(struct platform_device *pdev) · line 1512

Quoted 9 lines
drivers/i2c/busses/i2c-imx.c +1 -2
@@ -1506,8 +1506,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
 		goto rpm_disable;
 
 	/* Request IRQ */
-	ret = request_threaded_irq(irq, i2c_imx_isr, NULL, IRQF_SHARED,
-				   pdev->name, i2c_imx);
+	ret = request_irq(irq, i2c_imx_isr, IRQF_SHARED, pdev->name, i2c_imx);
 	if (ret) {
 		dev_err(&pdev->dev, "can't claim irq %d\n", irq);
 		goto rpm_disable;

There are a few more drivers that could benefit from the same patch (i.e.
drivers/gpu/drm/bridge/samsung-dsim.c drivers/iio/magnetometer/bmc150_magn.c drivers/scsi/mpi3mr/mpi3mr_fw.c drivers/spi/spi-fsl-dspi.c
as of today's next).

I assume you care for these, too?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
#2 lore raw
Quoted 37 lines · Uwe Kleine-König

Hello Dan,

Quoted 14 lines · Dan Carpenter

This is passing a NULL thread to request_threaded_irq(). So it's not really a threaded IRQ at all. It's more readable to call request_irq() instead.

---
 drivers/i2c/busses/i2c-imx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/i2c/busses/i2c-imx.c +0 -0
index 65128a73e8a3..c0cac5bcfdd1 100644

drivers/i2c/busses/i2c-imx.c static int i2c_imx_probe(struct platform_device *pdev) · line 1512

Quoted 9 lines
drivers/i2c/busses/i2c-imx.c +1 -2
@@ -1506,8 +1506,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
 		goto rpm_disable;
 
 	/* Request IRQ */
-	ret = request_threaded_irq(irq, i2c_imx_isr, NULL, IRQF_SHARED,
-				   pdev->name, i2c_imx);
+	ret = request_irq(irq, i2c_imx_isr, IRQF_SHARED, pdev->name, i2c_imx);
 	if (ret) {
 		dev_err(&pdev->dev, "can't claim irq %d\n", irq);
 		goto rpm_disable;

There are a few more drivers that could benefit from the same patch (i.e.
drivers/gpu/drm/bridge/samsung-dsim.c drivers/iio/magnetometer/bmc150_magn.c drivers/scsi/mpi3mr/mpi3mr_fw.c drivers/spi/spi-fsl-dspi.c
as of today's next).

Quoted 2 lines

I assume you care for these, too?

I had a couple more I was planning to send. I was sending them slowly to see if people wanted to make them into threaded IRQs instead of officially making them unthreaded.

regards,
dan carpenter

maintainer Applied
#3 lore raw
In reply to Dan Carpenter

Hi

Quoted 5 lines · Dan Carpenter

This is passing a NULL thread to request_threaded_irq(). So it's not really a threaded IRQ at all. It's more readable to call request_irq() instead.

Applied to i2c/andi-for-next on

https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git

Please note that this patch may still undergo further evaluation and the final decision will be made in collaboration with Wolfram.

Thank you,
Andi

Patches applied
===============
[1/1] i2c: imx: Clean up a call to request_irq()

      commit: b4fd609a2018bb0bfce9351c506a6e0dc7fb64e8
Applied
#4 lore raw
Quoted 10 lines · Andi Shyti

Hi

Quoted 5 lines · Dan Carpenter

This is passing a NULL thread to request_threaded_irq(). So it's not really a threaded IRQ at all. It's more readable to call request_irq() instead.

Applied to i2c/andi-for-next on

Applied to for-next (via Andi's branch), thanks!