All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Hannes Reinecke <hare@suse.de>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] drivers/scsi/aic7xxx/aic7xxx_osm_pci.c - remove pointer comparison to 0
Date: Mon, 11 Feb 2008 09:08:05 -0800	[thread overview]
Message-ID: <1202749685.13411.11.camel@localhost> (raw)
In-Reply-To: <1202743820.3122.13.camel@localhost.localdomain>

On Mon, 2008-02-11 at 09:30 -0600, James Bottomley wrote:
> On Sun, 2008-02-10 at 21:47 -0800, Joe Perches wrote:
> > -       if (request_region(*base, 256, "aic7xxx") == 0)
> > +       if (!request_region(*base, 256, "aic7xxx"))
> 
> This patch is completely pointless.

It removes a sparse warning.

> There's a marginal preference for if (!x) over if (x == NULL)
> for pointers, but it's still up to a driver writer if they wish to use
> the marginally unpreferred form.

Use == NULL then if you care to.

cheers, Joe


  reply	other threads:[~2008-02-11 17:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11  5:47 [PATCH] drivers/scsi/aic7xxx/aic7xxx_osm_pci.c - remove pointer comparison to 0 Joe Perches
2008-02-11 15:30 ` James Bottomley
2008-02-11 17:08   ` Joe Perches [this message]
2008-02-11 17:17     ` Randy Dunlap
2008-02-11 17:49       ` James Bottomley

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=1202749685.13411.11.camel@localhost \
    --to=joe@perches.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.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.