lkml.org 
[lkml]   [2015]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch: detect leading * in NULL comparison check
From
Date
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.


\
 
 \ /
  Last update: 2015-12-13 22:01    [W:0.053 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site