staging:vt6655: Fix sparse warnings of using plain integer as NULL pointer
authorHimangi Saraogi <himangi774@gmail.com>
Mon, 17 Mar 2014 09:23:10 +0000 (14:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Mar 2014 18:01:21 +0000 (11:01 -0700)
commit625fd1a9913d7b68ccd9652e3b2e5b829305a37a
tree629aa5815086f756199fc5f93b4455f4b0b1e32d
parent4a87df3ef82f4eda9a36e2af8494607d6a830a81
staging:vt6655: Fix sparse warnings of using plain integer as NULL pointer

This patch fixes the following sparse warnings:
drivers/staging/vt6655/wmgr.c:970:42: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:971:41: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:972:38: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:973:43: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4110:37: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4111:41: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4112:34: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4113:30: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4114:35: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4123:32: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:1815:41: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:1816:34: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:1817:30: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:1818:35: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:2075:63: warning: Using plain integer as NULL pointer

The following coccinelle script was used to achieve this:
@rule1@
expression *x;
@@
(
- x = 0;
+ x = NULL;
|
- (x == 0)
+ (x == NULL)
|
- (x != 0)
+ (x != NULL)
)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/wmgr.c