alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
@ 2012-08-30 15:16 Fengguang Wu
  2012-09-05  5:40 ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Fengguang Wu @ 2012-08-30 15:16 UTC (permalink / raw)
  To: Dimitris Papastamos, Mark Brown; +Cc: alsa-devel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

[add more CC on request of Dimitris]

Hi Dimitris, Mark,

FYI, there are new coccinelle warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-3.7
head:   e3523e01869da20fdd12ffd19ae1df7bf492650e
commit: e3523e01869da20fdd12ffd19ae1df7bf492650e [95/95] ASoC: wm0010: Add initial wm0010 DSP driver

All coccinelle warnings:

+ sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
--
+ sound/soc/codecs/wm0010.c:660:1-7: preceding lock on line 359

vim +850 sound/soc/codecs/wm0010.c
   847			trigger = IRQF_TRIGGER_FALLING;
   848		trigger |= IRQF_ONESHOT;
   849	
 > 850		ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger,
   851					   "wm0010", wm0010);
   852		if (ret)
   853			dev_err(wm0010->dev, "Failed to request IRQ %d: %d\n",

Please consider folding the attached diff :-)

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com>                     Intel Corporation

[-- Attachment #2: irqf_oneshot-wm0010.patch --]
[-- Type: text/x-diff, Size: 965 bytes --]

[PATCH] wm0010: fix coccinelle warnings

/c/kernel-tests/src/linux/sound/soc/codecs/wm0010.c:850: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

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

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

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

 cocci-output-17570-fcfaec-wm0010.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/soc/codecs/wm0010.c
+++ b/sound/soc/codecs/wm0010.c
@@ -847,7 +847,7 @@ static int wm0010_probe(struct snd_soc_c
 		trigger = IRQF_TRIGGER_FALLING;
 	trigger |= IRQF_ONESHOT;
 
-	ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger,
+	ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger | IRQF_ONESHOT,
 				   "wm0010", wm0010);
 	if (ret)
 		dev_err(wm0010->dev, "Failed to request IRQ %d: %d\n",

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-08-30 15:16 [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Fengguang Wu
@ 2012-09-05  5:40 ` Mark Brown
  2012-09-05  5:56   ` Fengguang Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2012-09-05  5:40 UTC (permalink / raw)
  To: Fengguang Wu; +Cc: Dimitris Papastamos, alsa-devel, kernel-janitors

On Thu, Aug 30, 2012 at 08:16:52AM -0700, Fengguang Wu wrote:

> [PATCH] wm0010: fix coccinelle warnings
> 
> /c/kernel-tests/src/linux/sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Gah, just noticed the patch buried in here.  If you're generating stuff
like this I'd suggest restructuring the submission so it comes out as an
normal patch, it's not at all obvious that there's a patch in the mail
and even if one notices.  In this case I'd mostly ignored your mail as I
expected Dimitris to fix it, will apply now.

Julia generally does a pretty good job of formatting her mails, perhaps
there's some scripts she uses whcih would help?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05  5:40 ` Mark Brown
@ 2012-09-05  5:56   ` Fengguang Wu
  2012-09-05 12:05     ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Fengguang Wu @ 2012-09-05  5:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: Dimitris Papastamos, Julia Lawall, alsa-devel, kernel-janitors

On Wed, Sep 05, 2012 at 06:40:25AM +0100, Mark Brown wrote:
> On Thu, Aug 30, 2012 at 08:16:52AM -0700, Fengguang Wu wrote:
> 
> > [PATCH] wm0010: fix coccinelle warnings
> > 
> > /c/kernel-tests/src/linux/sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
> 
> Gah, just noticed the patch buried in here.  If you're generating stuff
> like this I'd suggest restructuring the submission so it comes out as an
> normal patch, it's not at all obvious that there's a patch in the mail
> and even if one notices.  In this case I'd mostly ignored your mail as I
> expected Dimitris to fix it, will apply now.

Oh I forgot it, too. Sorry! It does look better be submitted as a
patch rather than a coccinelle warning.

> Julia generally does a pretty good job of formatting her mails, perhaps
> there's some scripts she uses whcih would help?

Julia Lawall? Added CC to her.

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05  5:56   ` Fengguang Wu
@ 2012-09-05 12:05     ` Mark Brown
  2012-09-05 13:33       ` Julia Lawall
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2012-09-05 12:05 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Dimitris Papastamos, Julia Lawall, alsa-devel, kernel-janitors

On Wed, Sep 05, 2012 at 01:56:09PM +0800, Fengguang Wu wrote:
> On Wed, Sep 05, 2012 at 06:40:25AM +0100, Mark Brown wrote:
> > On Thu, Aug 30, 2012 at 08:16:52AM -0700, Fengguang Wu wrote:

> > Julia generally does a pretty good job of formatting her mails, perhaps
> > there's some scripts she uses whcih would help?

> Julia Lawall? Added CC to her.

Yes.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05 12:05     ` Mark Brown
@ 2012-09-05 13:33       ` Julia Lawall
  2012-09-05 13:48         ` Fengguang Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2012-09-05 13:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: Dimitris Papastamos, Julia Lawall, alsa-devel, Fengguang Wu,
	kernel-janitors

On Wed, 5 Sep 2012, Mark Brown wrote:

> On Wed, Sep 05, 2012 at 01:56:09PM +0800, Fengguang Wu wrote:
> > On Wed, Sep 05, 2012 at 06:40:25AM +0100, Mark Brown wrote:
> > > On Thu, Aug 30, 2012 at 08:16:52AM -0700, Fengguang Wu wrote:
>
> > > Julia generally does a pretty good job of formatting her mails, perhaps
> > > there's some scripts she uses whcih would help?
>
> > Julia Lawall? Added CC to her.
>
> Yes.

I'm missing some context...

julia

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05 13:33       ` Julia Lawall
@ 2012-09-05 13:48         ` Fengguang Wu
  2012-09-05 13:55           ` Julia Lawall
  0 siblings, 1 reply; 11+ messages in thread
From: Fengguang Wu @ 2012-09-05 13:48 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Dimitris Papastamos, alsa-devel, Mark Brown, kernel-janitors

On Wed, Sep 05, 2012 at 03:33:26PM +0200, Julia Lawall wrote:
> On Wed, 5 Sep 2012, Mark Brown wrote:
> 
> > On Wed, Sep 05, 2012 at 01:56:09PM +0800, Fengguang Wu wrote:
> > > On Wed, Sep 05, 2012 at 06:40:25AM +0100, Mark Brown wrote:
> > > > On Thu, Aug 30, 2012 at 08:16:52AM -0700, Fengguang Wu wrote:
> >
> > > > Julia generally does a pretty good job of formatting her mails, perhaps
> > > > there's some scripts she uses whcih would help?
> >
> > > Julia Lawall? Added CC to her.
> >
> > Yes.
> 
> I'm missing some context...

Julia, you've posted some pretty neat (coccinelle generated?) patches
to the list. So we wonder whether you have some scripts for formatting
patches based on the coccinelle output?

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05 13:48         ` Fengguang Wu
@ 2012-09-05 13:55           ` Julia Lawall
  2012-09-05 14:06             ` Fengguang Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2012-09-05 13:55 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Dimitris Papastamos, Julia Lawall, alsa-devel, Mark Brown,
	kernel-janitors

On Wed, 5 Sep 2012, Fengguang Wu wrote:

> On Wed, Sep 05, 2012 at 03:33:26PM +0200, Julia Lawall wrote:
> > On Wed, 5 Sep 2012, Mark Brown wrote:
> >
> > > On Wed, Sep 05, 2012 at 01:56:09PM +0800, Fengguang Wu wrote:
> > > > On Wed, Sep 05, 2012 at 06:40:25AM +0100, Mark Brown wrote:
> > > > > On Thu, Aug 30, 2012 at 08:16:52AM -0700, Fengguang Wu wrote:
> > >
> > > > > Julia generally does a pretty good job of formatting her mails, perhaps
> > > > > there's some scripts she uses whcih would help?
> > >
> > > > Julia Lawall? Added CC to her.
> > >
> > > Yes.
> >
> > I'm missing some context...
>
> Julia, you've posted some pretty neat (coccinelle generated?) patches
> to the list. So we wonder whether you have some scripts for formatting
> patches based on the coccinelle output?

I do have a tool, but it doesn't exactly take the output produced by
coccicheck.  I can look into how this could be done.

The input desired would be the text printed by Coccinelle and a patch
generated by git?

julia

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05 13:55           ` Julia Lawall
@ 2012-09-05 14:06             ` Fengguang Wu
  2012-09-05 20:01               ` Julia Lawall
  0 siblings, 1 reply; 11+ messages in thread
From: Fengguang Wu @ 2012-09-05 14:06 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Dimitris Papastamos, alsa-devel, Mark Brown, kernel-janitors

On Wed, Sep 05, 2012 at 03:55:13PM +0200, Julia Lawall wrote:
> On Wed, 5 Sep 2012, Fengguang Wu wrote:
> 
> > On Wed, Sep 05, 2012 at 03:33:26PM +0200, Julia Lawall wrote:
> > > On Wed, 5 Sep 2012, Mark Brown wrote:
> > >
> > > > On Wed, Sep 05, 2012 at 01:56:09PM +0800, Fengguang Wu wrote:
> > > > > On Wed, Sep 05, 2012 at 06:40:25AM +0100, Mark Brown wrote:
> > > > > > On Thu, Aug 30, 2012 at 08:16:52AM -0700, Fengguang Wu wrote:
> > > >
> > > > > > Julia generally does a pretty good job of formatting her mails, perhaps
> > > > > > there's some scripts she uses whcih would help?
> > > >
> > > > > Julia Lawall? Added CC to her.
> > > >
> > > > Yes.
> > >
> > > I'm missing some context...
> >
> > Julia, you've posted some pretty neat (coccinelle generated?) patches
> > to the list. So we wonder whether you have some scripts for formatting
> > patches based on the coccinelle output?
> 
> I do have a tool, but it doesn't exactly take the output produced by
> coccicheck.  I can look into how this could be done.
> 
> The input desired would be the text printed by Coccinelle and a patch
> generated by git?

I'm just adapting the coccinelle generated diff into a mechanically
formated patch.

Here is the discussed patch, generated by a simple script.
It mainly serves as a good start point for patch submission.

: [PATCH] wm0010: fix coccinelle warnings
: 
: sound/soc/codecs/wm0010.c:850: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
: 
: Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci
: 
: Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
: ---
: 
: Please take the patch only if it's a positive warning. Thanks!
: 
:  cocci-output-17570-fcfaec-wm0010.c |    2 +-
:  1 file changed, 1 insertion(+), 1 deletion(-)
: 
: --- a/sound/soc/codecs/wm0010.c
: +++ b/sound/soc/codecs/wm0010.c
: @@ -847,7 +847,7 @@ static int wm0010_probe(struct snd_soc_c
:                 trigger = IRQF_TRIGGER_FALLING;
:         trigger |= IRQF_ONESHOT;
: 
: -       ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger,
: +       ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger | IRQF_ONESHOT,
:                                    "wm0010", wm0010);
:         if (ret)
:                 dev_err(wm0010->dev, "Failed to request IRQ %d: %d\n",
: 

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05 14:06             ` Fengguang Wu
@ 2012-09-05 20:01               ` Julia Lawall
  2012-09-05 22:20                 ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2012-09-05 20:01 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Dimitris Papastamos, Julia Lawall, alsa-devel, Mark Brown,
	kernel-janitors



On Wed, 5 Sep 2012, Fengguang Wu wrote:

> On Wed, Sep 05, 2012 at 03:55:13PM +0200, Julia Lawall wrote:
> > On Wed, 5 Sep 2012, Fengguang Wu wrote:
> >
> > > On Wed, Sep 05, 2012 at 03:33:26PM +0200, Julia Lawall wrote:
> > > > On Wed, 5 Sep 2012, Mark Brown wrote:
> > > >
> > > > > On Wed, Sep 05, 2012 at 01:56:09PM +0800, Fengguang Wu wrote:
> > > > > > On Wed, Sep 05, 2012 at 06:40:25AM +0100, Mark Brown wrote:
> > > > > > > On Thu, Aug 30, 2012 at 08:16:52AM -0700, Fengguang Wu wrote:
> > > > >
> > > > > > > Julia generally does a pretty good job of formatting her mails, perhaps
> > > > > > > there's some scripts she uses whcih would help?
> > > > >
> > > > > > Julia Lawall? Added CC to her.
> > > > >
> > > > > Yes.
> > > >
> > > > I'm missing some context...
> > >
> > > Julia, you've posted some pretty neat (coccinelle generated?) patches
> > > to the list. So we wonder whether you have some scripts for formatting
> > > patches based on the coccinelle output?
> >
> > I do have a tool, but it doesn't exactly take the output produced by
> > coccicheck.  I can look into how this could be done.
> >
> > The input desired would be the text printed by Coccinelle and a patch
> > generated by git?
>
> I'm just adapting the coccinelle generated diff into a mechanically
> formated patch.
>
> Here is the discussed patch, generated by a simple script.
> It mainly serves as a good start point for patch submission.
>
> : [PATCH] wm0010: fix coccinelle warnings
> :
> : sound/soc/codecs/wm0010.c:850: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
> :
> : Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci
> :
> : Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> : ---
> :
> : Please take the patch only if it's a positive warning. Thanks!
> :
> :  cocci-output-17570-fcfaec-wm0010.c |    2 +-
> :  1 file changed, 1 insertion(+), 1 deletion(-)
> :
> : --- a/sound/soc/codecs/wm0010.c
> : +++ b/sound/soc/codecs/wm0010.c
> : @@ -847,7 +847,7 @@ static int wm0010_probe(struct snd_soc_c
> :                 trigger = IRQF_TRIGGER_FALLING;
> :         trigger |= IRQF_ONESHOT;
> :
> : -       ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger,
> : +       ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger | IRQF_ONESHOT,
> :                                    "wm0010", wm0010);
> :         if (ret)
> :                 dev_err(wm0010->dev, "Failed to request IRQ %d: %d\n",
> :

I'm not sure what could be done better...

julia

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05 20:01               ` Julia Lawall
@ 2012-09-05 22:20                 ` Mark Brown
  2012-09-05 22:39                   ` Fengguang Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2012-09-05 22:20 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Dimitris Papastamos, alsa-devel, Fengguang Wu, kernel-janitors

On Wed, Sep 05, 2012 at 10:01:12PM +0200, Julia Lawall wrote:

> I'm not sure what could be done better...

The patch itself was fine but it was buried as an attachment to a mail
that didn't have anything like a [PATCH] tag or anything so it was very
hidden when it turned up in e-mail.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
  2012-09-05 22:20                 ` Mark Brown
@ 2012-09-05 22:39                   ` Fengguang Wu
  0 siblings, 0 replies; 11+ messages in thread
From: Fengguang Wu @ 2012-09-05 22:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Dimitris Papastamos, Julia Lawall, alsa-devel, kernel-janitors

On Thu, Sep 06, 2012 at 06:20:50AM +0800, Mark Brown wrote:
> On Wed, Sep 05, 2012 at 10:01:12PM +0200, Julia Lawall wrote:
> 
> > I'm not sure what could be done better...
> 
> The patch itself was fine but it was buried as an attachment to a mail
> that didn't have anything like a [PATCH] tag or anything so it was very
> hidden when it turned up in e-mail.

Yes, this is a problem. I'll avoid such hidden coccinelle patches in future.

Thanks for the reminding!

Fengguang

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-09-05 22:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-30 15:16 [asoc:for-3.7 95/95] sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Fengguang Wu
2012-09-05  5:40 ` Mark Brown
2012-09-05  5:56   ` Fengguang Wu
2012-09-05 12:05     ` Mark Brown
2012-09-05 13:33       ` Julia Lawall
2012-09-05 13:48         ` Fengguang Wu
2012-09-05 13:55           ` Julia Lawall
2012-09-05 14:06             ` Fengguang Wu
2012-09-05 20:01               ` Julia Lawall
2012-09-05 22:20                 ` Mark Brown
2012-09-05 22:39                   ` Fengguang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).