All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhuguangqing83@gmail.com
To: Sebastian Reichel <sre@kernel.org>, Milo Kim <milo.kim@ti.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Guangqing Zhu <zhuguangqing83@gmail.com>
Subject: [PATCH] power: supply: Fix missing IRQF_ONESHOT as only threaded handler
Date: Tue,  6 Apr 2021 13:28:29 +0800	[thread overview]
Message-ID: <20210406052829.22826-1-zhuguangqing83@gmail.com> (raw)

From: Guangqing Zhu <zhuguangqing83@gmail.com>

Coccinelle noticed:
 1. drivers/power/supply/pm2301_charger.c:1089:7-27: ERROR: Threaded IRQ
    with no primary handler requested without IRQF_ONESHOT
 2. drivers/power/supply/tps65090-charger.c:303:8-33: ERROR: Threaded IRQ
    with no primary handler requested without IRQF_ONESHOT
 3. drivers/power/supply/tps65217_charger.c:239:8-33: ERROR: Threaded IRQ
    with no primary handler requested without IRQF_ONESHOT
 4. drivers/power/supply/lp8788-charger.c:502:8-28: ERROR: Threaded IRQ
    with no primary handler requested without IRQF_ONESHOT

Signed-off-by: Guangqing Zhu <zhuguangqing83@gmail.com>
---
 drivers/power/supply/lp8788-charger.c   | 2 +-
 drivers/power/supply/pm2301_charger.c   | 2 +-
 drivers/power/supply/tps65090-charger.c | 3 ++-
 drivers/power/supply/tps65217_charger.c | 4 ++--
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/power/supply/lp8788-charger.c b/drivers/power/supply/lp8788-charger.c
index e7931ffb7151..397e5a03b7d9 100644
--- a/drivers/power/supply/lp8788-charger.c
+++ b/drivers/power/supply/lp8788-charger.c
@@ -501,7 +501,7 @@ static int lp8788_set_irqs(struct platform_device *pdev,
 
 		ret = request_threaded_irq(virq, NULL,
 					lp8788_charger_irq_thread,
-					0, name, pchg);
+					IRQF_ONESHOT, name, pchg);
 		if (ret)
 			break;
 	}
diff --git a/drivers/power/supply/pm2301_charger.c b/drivers/power/supply/pm2301_charger.c
index ac06ecf7fc9c..a3bfb9612b17 100644
--- a/drivers/power/supply/pm2301_charger.c
+++ b/drivers/power/supply/pm2301_charger.c
@@ -1089,7 +1089,7 @@ static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client,
 	ret = request_threaded_irq(gpio_to_irq(pm2->pdata->gpio_irq_number),
 				NULL,
 				pm2xxx_charger_irq[0].isr,
-				pm2->pdata->irq_type,
+				pm2->pdata->irq_type | IRQF_ONESHOT,
 				pm2xxx_charger_irq[0].name, pm2);
 
 	if (ret != 0) {
diff --git a/drivers/power/supply/tps65090-charger.c b/drivers/power/supply/tps65090-charger.c
index 6b0098e5a88b..d55bcc341854 100644
--- a/drivers/power/supply/tps65090-charger.c
+++ b/drivers/power/supply/tps65090-charger.c
@@ -301,7 +301,8 @@ static int tps65090_charger_probe(struct platform_device *pdev)
 
 	if (irq != -ENXIO) {
 		ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
-			tps65090_charger_isr, 0, "tps65090-charger", cdata);
+			tps65090_charger_isr, IRQF_ONESHOT,
+			"tps65090-charger", cdata);
 		if (ret) {
 			dev_err(cdata->dev,
 				"Unable to register irq %d err %d\n", irq,
diff --git a/drivers/power/supply/tps65217_charger.c b/drivers/power/supply/tps65217_charger.c
index 814c2b81fdfe..cba3967ff275 100644
--- a/drivers/power/supply/tps65217_charger.c
+++ b/drivers/power/supply/tps65217_charger.c
@@ -238,8 +238,8 @@ static int tps65217_charger_probe(struct platform_device *pdev)
 	for (i = 0; i < NUM_CHARGER_IRQS; i++) {
 		ret = devm_request_threaded_irq(&pdev->dev, irq[i], NULL,
 						tps65217_charger_irq,
-						0, "tps65217-charger",
-						charger);
+						IRQF_ONESHOT,
+						"tps65217-charger", charger);
 		if (ret) {
 			dev_err(charger->dev,
 				"Unable to register irq %d err %d\n", irq[i],
-- 
2.17.1


             reply	other threads:[~2021-04-06  5:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  5:28 zhuguangqing83 [this message]
2021-04-08 12:43 ` [PATCH] power: supply: Fix missing IRQF_ONESHOT as only threaded handler Sebastian Reichel
  -- strict thread matches above, loose matches on Subject: below --
2020-11-16  1:07 Tian Tao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210406052829.22826-1-zhuguangqing83@gmail.com \
    --to=zhuguangqing83@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=milo.kim@ti.com \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.