* RE: [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn
2012-09-27 1:11 [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: Fengguang Wu
@ 2012-09-27 5:00 ` H Hartley Sweeten
2012-09-27 5:18 ` Fengguang Wu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: H Hartley Sweeten @ 2012-09-27 5:00 UTC (permalink / raw)
To: kernel-janitors
On Wednesday, September 26, 2012 6:11 PM, Fengguang Wu wrote:
>
> FYI, there are new smatch warnings show up in
>
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
> head: 3cd73bc1cf59b2c9232d9889ba2b148e262054b6
> commit: 8c7e4277c1197d31c0b34dbaf23e6edddb5978f7 [253/267] staging: comedi: s626: cleanup request_irq in s626_attach_pci()
>
> drivers/staging/comedi/drivers/s626.c:1428 s626_ai_cmd() Error invalid range 4096 to -1
> drivers/staging/comedi/drivers/s626.c:1448 s626_ai_cmd() Error invalid range 4096 to -1
> drivers/staging/comedi/drivers/s626.c:1649 s626_ai_cmdtest() Error invalid range 4096 to -1
> drivers/staging/comedi/drivers/s626.c:1656 s626_ai_cmdtest() Error invalid range 4096 to -1
> drivers/staging/comedi/drivers/s626.c:2504 s626_attach_pci() warn: '(dev->private)->base_addr' was not released on error
> drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: '(dev->private)->base_addr' was not released on error
> + drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: 'pcidev->irq' was not released on error
These shouldn't be "new" warnings. The logic of the code has
not been changed. Its just been shuffled around.
I'll take a look at the first four tommorrow just to make sure.
They may actually be a problem but they shouldn't be new.
The last three warnings should exist in _every_ comedi driver.
The comedi drivers are designed _not_ to release anything in
the "attach" functions. Everything gets released either in the
"detach" function or by the comedi core itself. I think it was
orignally modeled on the tty subsystem.
I plan on looking into if it would be cleaner for the "attach"
functions to cleanup after themselves on error. My initial
impression is that the patch to "fix" this is going to be huge...
Regards,
Hartley
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn
2012-09-27 1:11 [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: Fengguang Wu
2012-09-27 5:00 ` [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn H Hartley Sweeten
@ 2012-09-27 5:18 ` Fengguang Wu
2012-09-27 7:27 ` Dan Carpenter
2012-09-27 7:38 ` Fengguang Wu
3 siblings, 0 replies; 5+ messages in thread
From: Fengguang Wu @ 2012-09-27 5:18 UTC (permalink / raw)
To: kernel-janitors
On Thu, Sep 27, 2012 at 12:00:09AM -0500, H Hartley Sweeten wrote:
> On Wednesday, September 26, 2012 6:11 PM, Fengguang Wu wrote:
> >
> > FYI, there are new smatch warnings show up in
> >
> > tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
> > head: 3cd73bc1cf59b2c9232d9889ba2b148e262054b6
> > commit: 8c7e4277c1197d31c0b34dbaf23e6edddb5978f7 [253/267] staging: comedi: s626: cleanup request_irq in s626_attach_pci()
> >
> > drivers/staging/comedi/drivers/s626.c:1428 s626_ai_cmd() Error invalid range 4096 to -1
> > drivers/staging/comedi/drivers/s626.c:1448 s626_ai_cmd() Error invalid range 4096 to -1
> > drivers/staging/comedi/drivers/s626.c:1649 s626_ai_cmdtest() Error invalid range 4096 to -1
> > drivers/staging/comedi/drivers/s626.c:1656 s626_ai_cmdtest() Error invalid range 4096 to -1
> > drivers/staging/comedi/drivers/s626.c:2504 s626_attach_pci() warn: '(dev->private)->base_addr' was not released on error
> > drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: '(dev->private)->base_addr' was not released on error
> > + drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: 'pcidev->irq' was not released on error
>
> These shouldn't be "new" warnings. The logic of the code has
> not been changed. Its just been shuffled around.
>
> I'll take a look at the first four tommorrow just to make sure.
> They may actually be a problem but they shouldn't be new.
Right, it's not really a new *problem*. Technically, it's classified
as "new" by the script because of the s626_attach()=>s626_attach_pci()
rename, which makes it a new error *message*. This prevents the system
from bisecting it to the initial commit that caused the *problem*.
Hopefully such mistakes will only happen on a small fraction of pretty
old bugs.
> The last three warnings should exist in _every_ comedi driver.
> The comedi drivers are designed _not_ to release anything in
> the "attach" functions. Everything gets released either in the
> "detach" function or by the comedi core itself. I think it was
> orignally modeled on the tty subsystem.
Ah OK. These error messages will be ignored by the build system until
there comes another rename ;)
> I plan on looking into if it would be cleaner for the "attach"
> functions to cleanup after themselves on error. My initial
> impression is that the patch to "fix" this is going to be huge...
OK, thanks!
Fengguang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn
2012-09-27 1:11 [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: Fengguang Wu
2012-09-27 5:00 ` [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn H Hartley Sweeten
2012-09-27 5:18 ` Fengguang Wu
@ 2012-09-27 7:27 ` Dan Carpenter
2012-09-27 7:38 ` Fengguang Wu
3 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2012-09-27 7:27 UTC (permalink / raw)
To: kernel-janitors
On Thu, Sep 27, 2012 at 01:18:00PM +0800, Fengguang Wu wrote:
> On Thu, Sep 27, 2012 at 12:00:09AM -0500, H Hartley Sweeten wrote:
> > On Wednesday, September 26, 2012 6:11 PM, Fengguang Wu wrote:
> > >
> > > FYI, there are new smatch warnings show up in
> > >
> > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
> > > head: 3cd73bc1cf59b2c9232d9889ba2b148e262054b6
> > > commit: 8c7e4277c1197d31c0b34dbaf23e6edddb5978f7 [253/267] staging: comedi: s626: cleanup request_irq in s626_attach_pci()
> > >
> > > drivers/staging/comedi/drivers/s626.c:1428 s626_ai_cmd() Error invalid range 4096 to -1
> > > drivers/staging/comedi/drivers/s626.c:1448 s626_ai_cmd() Error invalid range 4096 to -1
> > > drivers/staging/comedi/drivers/s626.c:1649 s626_ai_cmdtest() Error invalid range 4096 to -1
> > > drivers/staging/comedi/drivers/s626.c:1656 s626_ai_cmdtest() Error invalid range 4096 to -1
> > > drivers/staging/comedi/drivers/s626.c:2504 s626_attach_pci() warn: '(dev->private)->base_addr' was not released on error
> > > drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: '(dev->private)->base_addr' was not released on error
> > > + drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: 'pcidev->irq' was not released on error
Gar. That check produces too many false positives because of logic
like comedi's. I want to move it under --spammy.
Fengguang, that would be ok with you?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn
2012-09-27 1:11 [staging:staging-next 253/267] drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: Fengguang Wu
` (2 preceding siblings ...)
2012-09-27 7:27 ` Dan Carpenter
@ 2012-09-27 7:38 ` Fengguang Wu
3 siblings, 0 replies; 5+ messages in thread
From: Fengguang Wu @ 2012-09-27 7:38 UTC (permalink / raw)
To: kernel-janitors
On Thu, Sep 27, 2012 at 10:27:13AM +0300, Dan Carpenter wrote:
> On Thu, Sep 27, 2012 at 01:18:00PM +0800, Fengguang Wu wrote:
> > On Thu, Sep 27, 2012 at 12:00:09AM -0500, H Hartley Sweeten wrote:
> > > On Wednesday, September 26, 2012 6:11 PM, Fengguang Wu wrote:
> > > >
> > > > FYI, there are new smatch warnings show up in
> > > >
> > > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
> > > > head: 3cd73bc1cf59b2c9232d9889ba2b148e262054b6
> > > > commit: 8c7e4277c1197d31c0b34dbaf23e6edddb5978f7 [253/267] staging: comedi: s626: cleanup request_irq in s626_attach_pci()
> > > >
> > > > drivers/staging/comedi/drivers/s626.c:1428 s626_ai_cmd() Error invalid range 4096 to -1
> > > > drivers/staging/comedi/drivers/s626.c:1448 s626_ai_cmd() Error invalid range 4096 to -1
> > > > drivers/staging/comedi/drivers/s626.c:1649 s626_ai_cmdtest() Error invalid range 4096 to -1
> > > > drivers/staging/comedi/drivers/s626.c:1656 s626_ai_cmdtest() Error invalid range 4096 to -1
> > > > drivers/staging/comedi/drivers/s626.c:2504 s626_attach_pci() warn: '(dev->private)->base_addr' was not released on error
> > > > drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: '(dev->private)->base_addr' was not released on error
> > > > + drivers/staging/comedi/drivers/s626.c:2516 s626_attach_pci() warn: 'pcidev->irq' was not released on error
>
> Gar. That check produces too many false positives because of logic
> like comedi's. I want to move it under --spammy.
>
> Fengguang, that would be ok with you?
I have no strong idea about this because I've not run into many such
"not released on error" warnings.
I don't quite get the "invalid range 4096 to -1" warnings and they
show up quite often. What's your typical way to tell whether it's a
false warning?
Thanks,
Fengguang
^ permalink raw reply [flat|nested] 5+ messages in thread