[Intel-wired-lan] [PATCH] igb: fix compare_const_fl.cocci warnings

Brown, Aaron F aaron.f.brown at intel.com
Thu Jan 7 03:12:55 UTC 2016


> From: Intel-wired-lan [intel-wired-lan-bounces at lists.osuosl.org] on behalf of Julia Lawall [julia.lawall at lip6.fr]
> Sent: Wednesday, December 23, 2015 4:58 AM
> To: Gangfeng Huang
> Cc: intel-wired-lan at lists.osuosl.org; kbuild-all at 01.org
> Subject: Re: [Intel-wired-lan] [PATCH] igb: fix compare_const_fl.cocci  warnings
> 
> Actully, there is a more serious problem here, that there are a lot of
> potential dereferences of invalid pointers, via calls like:
> 
> dev_err(&adapter->pdev->dev, "map to unbound device!\n")

> julia

I don't see that this patch changes that, it still seems proper to apply this clean up.

> On Wed, 23 Dec 2015, Julia Lawall wrote:
> 
> > Kernel code typically uses == NULL.
> >
> > Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
> >
> > CC: Gangfeng Huang <gangfeng.huang at ni.com>
> > Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall at lip6.fr>
> >
> > ---
> >
> > Alternatively, consider using !adapter.
> >
> >  igb_cdev.c |   14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown at intel.com>


More information about the Intel-wired-lan mailing list