Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290697

Re: [PATCH] checkpatch: detect leading * in NULL comparison check

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] checkpatch: detect leading * in NULL comparison check
Date 2015-12-13 21:50 +0100
Message-ID <qFlKG-4Mv-1@gated-at.bofh.it> (permalink)
References <qFjpw-3nE-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] checkpatch: detect leading * in NULL comparison check "S. Gilles" <sgilles@math.umd.edu> - 2015-12-13 19:20 +0100
  Re: [PATCH] checkpatch: detect leading * in NULL comparison check Joe Perches <joe@perches.com> - 2015-12-13 21:50 +0100
    Re: [PATCH] checkpatch: detect leading * in NULL comparison check "S. Gilles" <sgilles@math.umd.edu> - 2015-12-13 23:10 +0100

csiph-web