From: Joe Perches <joe@perches.com>
To: "S. Gilles" <sgilles@math.umd.edu>,
Andy Whitcroft <apw@canonical.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: detect leading * in NULL comparison check
Date: Sun, 13 Dec 2015 12:49:01 -0800 [thread overview]
Message-ID: <1450039741.20678.7.camel@perches.com> (raw)
In-Reply-To: <1450029592-476-1-git-send-email-sgilles@math.umd.edu>
On Sun, 2015-12-13 at 12:59 -0500, S. Gilles wrote:
> Prevent checkpatch.pl from emitting messages like
>
> CHECK: Comparison to NULL could be written "!rx_p"
> #51: FILE: drivers/staging/iio/accel/sca3000_ring.c:51:
> + if (*rx_p == NULL) {
>
> by checking for leading * characters in the comparison value.
>
> Signed-off-by: S. Gilles <sgilles@math.umd.edu>
> ---
>
> I've run this through everything in staging/ as a test, it seems to
> work okay.
This wouldn't work with
* foo == NULL;
but there don't seem to be any in the kernel source.
next prev parent reply other threads:[~2015-12-13 20:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 17:59 [PATCH] checkpatch: detect leading * in NULL comparison check S. Gilles
2015-12-13 20:49 ` Joe Perches [this message]
2015-12-13 22:02 ` S. Gilles
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=1450039741.20678.7.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sgilles@math.umd.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox