All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] igb: fix compare_const_fl.cocci warnings
Date: Thu, 7 Jan 2016 07:22:07 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.02.1601070721390.2210@localhost6.localdomain6> (raw)
In-Reply-To: <309B89C4C689E141A5FF6A0C5FB2118B81E4B146@ORSMSX101.amr.corp.intel.com>

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 <gangfeng.huang@ni.com>
> > > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > > Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> > >
> > > ---
> > >
> > > Alternatively, consider using !adapter.
> > >
> > >  igb_cdev.c |   14 +++++++-------
> > >  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> Tested-by: Aaron Brown <aaron.f.brown@intel.com>

  reply	other threads:[~2016-01-07  6:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 12:53 [Intel-wired-lan] [PATCH] igb: fix compare_const_fl.cocci warnings Julia Lawall
2015-12-23 12:58 ` Julia Lawall
2016-01-07  3:12   ` Brown, Aaron F
2016-01-07  6:22     ` Julia Lawall [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-14 15:00 Julia Lawall
2015-12-18  2:58 ` Brown, Aaron F

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1601070721390.2210@localhost6.localdomain6 \
    --to=julia.lawall@lip6.fr \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.