From: Julia Lawall Date: Thu, 7 Jan 2016 07:22:07 +0100 (CET) Subject: [Intel-wired-lan] [PATCH] igb: fix compare_const_fl.cocci warnings In-Reply-To: <309B89C4C689E141A5FF6A0C5FB2118B81E4B146@ORSMSX101.amr.corp.intel.com> References: , <309B89C4C689E141A5FF6A0C5FB2118B81E4B146@ORSMSX101.amr.corp.intel.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On Thu, 7 Jan 2016, Brown, Aaron F wrote: > > 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. No, the patch just does what the rule says, which is move the NULL to the other side. julia > > > 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 > > > Signed-off-by: Fengguang Wu > > > Signed-off-by: Julia Lawall > > > > > > --- > > > > > > Alternatively, consider using !adapter. > > > > > > igb_cdev.c | 14 +++++++------- > > > 1 file changed, 7 insertions(+), 7 deletions(-) > > Tested-by: Aaron Brown