2012-08-23 11:42:42

by Fengguang Wu

[permalink] [raw]
Subject: [PATCH] lp8727_charger: use IRQF_ONESHOT

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

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

Signed-off-by: Fengguang Wu <[email protected]>
---

Note: I don't really know much about the situation, feel free to
ignore it if it's an false warning.

cocci-output-25411-2ae2e0-lp8727_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/power/lp8727_charger.c
+++ b/drivers/power/lp8727_charger.c
@@ -255,7 +255,7 @@ static int lp8727_intr_config(struct lp8
return request_threaded_irq(pchg->client->irq,
NULL,
lp8727_isr_func,
- IRQF_TRIGGER_FALLING,
+ IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
"lp8727_irq",
pchg);
}


Attachments:
(No filename) (804.00 B)
irqf_oneshot-lp8727_charger.patch (819.00 B)
Download all attachments

2012-08-23 11:56:55

by Fengguang Wu

[permalink] [raw]
Subject: [PATCH] twl4030_charger: use IRQF_ONESHOT

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

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

Signed-off-by: Fengguang Wu <[email protected]>
---

Please take the patch only if it's a positive warning. Thanks!

drivers/power/twl4030_charger.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux.orig/drivers/power/twl4030_charger.c 2012-08-03 15:36:21.615560783 +0800
+++ linux/drivers/power/twl4030_charger.c 2012-08-23 19:53:21.737195171 +0800
@@ -534,7 +534,7 @@ static int __init twl4030_bci_probe(stru
}

ret = request_threaded_irq(bci->irq_chg, NULL,
- twl4030_charger_interrupt, 0, pdev->name, bci);
+ twl4030_charger_interrupt, IRQF_ONESHOT, pdev->name, bci);
if (ret < 0) {
dev_err(&pdev->dev, "could not request irq %d, status %d\n",
bci->irq_chg, ret);
@@ -542,7 +542,7 @@ static int __init twl4030_bci_probe(stru
}

ret = request_threaded_irq(bci->irq_bci, NULL,
- twl4030_bci_interrupt, 0, pdev->name, bci);
+ twl4030_bci_interrupt, IRQF_ONESHOT, pdev->name, bci);
if (ret < 0) {
dev_err(&pdev->dev, "could not request irq %d, status %d\n",
bci->irq_bci, ret);

2012-08-23 12:04:44

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH] twl4030_charger: use IRQF_ONESHOT

On Thu, Aug 23, 2012 at 07:56:43PM +0800, Fengguang Wu wrote:
> Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci
>
> Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT
>
> Signed-off-by: Fengguang Wu <[email protected]>

makes sense, NULL hardirq handler:

Acked-by: Felipe Balbi <[email protected]>

> ---
>
> Please take the patch only if it's a positive warning. Thanks!
>
> drivers/power/twl4030_charger.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux.orig/drivers/power/twl4030_charger.c 2012-08-03 15:36:21.615560783 +0800
> +++ linux/drivers/power/twl4030_charger.c 2012-08-23 19:53:21.737195171 +0800
> @@ -534,7 +534,7 @@ static int __init twl4030_bci_probe(stru
> }
>
> ret = request_threaded_irq(bci->irq_chg, NULL,
> - twl4030_charger_interrupt, 0, pdev->name, bci);
> + twl4030_charger_interrupt, IRQF_ONESHOT, pdev->name, bci);
> if (ret < 0) {
> dev_err(&pdev->dev, "could not request irq %d, status %d\n",
> bci->irq_chg, ret);
> @@ -542,7 +542,7 @@ static int __init twl4030_bci_probe(stru
> }
>
> ret = request_threaded_irq(bci->irq_bci, NULL,
> - twl4030_bci_interrupt, 0, pdev->name, bci);
> + twl4030_bci_interrupt, IRQF_ONESHOT, pdev->name, bci);
> if (ret < 0) {
> dev_err(&pdev->dev, "could not request irq %d, status %d\n",
> bci->irq_bci, ret);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
balbi


Attachments:
(No filename) (1.62 kB)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-08-29 02:01:01

by Kim, Milo

[permalink] [raw]
Subject: RE: [PATCH] lp8727_charger: use IRQF_ONESHOT

> 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
>
> Signed-off-by: Fengguang Wu <[email protected]>
> ---
>
> Note: I don't really know much about the situation, feel free to
> ignore it if it's an false warning.
>
> cocci-output-25411-2ae2e0-lp8727_charger.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/power/lp8727_charger.c
> +++ b/drivers/power/lp8727_charger.c
> @@ -255,7 +255,7 @@ static int lp8727_intr_config(struct lp8
> return request_threaded_irq(pchg->client->irq,
> NULL,
> lp8727_isr_func,
> - IRQF_TRIGGER_FALLING,
> + IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> "lp8727_irq",
> pchg);
> }
Thanks for the update.

Acked-by: Milo(Woogyom) Kim <[email protected]>

Best Regards,
Milo


2012-08-30 11:42:05

by Kim, Milo

[permalink] [raw]
Subject: RE: [PATCH] lp8727_charger: use IRQF_ONESHOT

> > 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
> >
> > Signed-off-by: Fengguang Wu <[email protected]>
> > ---
> >
> > Note: I don't really know much about the situation, feel free to
> > ignore it if it's an false warning.
> >
> > cocci-output-25411-2ae2e0-lp8727_charger.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- a/drivers/power/lp8727_charger.c
> > +++ b/drivers/power/lp8727_charger.c
> > @@ -255,7 +255,7 @@ static int lp8727_intr_config(struct lp8
> > return request_threaded_irq(pchg->client->irq,
> > NULL,
> > lp8727_isr_func,
> > - IRQF_TRIGGER_FALLING,
> > + IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> > "lp8727_irq",
> > pchg);
> > }
> Thanks for the update.
>
> Acked-by: Milo(Woogyom) Kim <[email protected]>
>

Please refer to the patch below.
[PATCH 4/8] lp8727_charger: cleanup the interrupt handler code
This includes previous Fengguang' patch.

Best Regards,
Milo

2012-08-30 12:09:19

by Anton Vorontsov

[permalink] [raw]
Subject: Re: [PATCH] lp8727_charger: use IRQF_ONESHOT

On Thu, Aug 30, 2012 at 11:41:54AM +0000, Kim, Milo wrote:
> > > 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
> > >
> > > Signed-off-by: Fengguang Wu <[email protected]>
> > > ---
> > >
> > > Note: I don't really know much about the situation, feel free to
> > > ignore it if it's an false warning.
> > >
> > > cocci-output-25411-2ae2e0-lp8727_charger.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > --- a/drivers/power/lp8727_charger.c
> > > +++ b/drivers/power/lp8727_charger.c
> > > @@ -255,7 +255,7 @@ static int lp8727_intr_config(struct lp8
> > > return request_threaded_irq(pchg->client->irq,
> > > NULL,
> > > lp8727_isr_func,
> > > - IRQF_TRIGGER_FALLING,
> > > + IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> > > "lp8727_irq",
> > > pchg);
> > > }
> > Thanks for the update.
> >
> > Acked-by: Milo(Woogyom) Kim <[email protected]>
> >
>
> Please refer to the patch below.
> [PATCH 4/8] lp8727_charger: cleanup the interrupt handler code
> This includes previous Fengguang' patch.

Nope, I'll include Fengguang's patch (he posted it first), and then
will try to apply the rest of your cleanups on top of it. If it helps,
your can incorporate the fix in your series, preserving the authorship.

Thanks.