[NET]: sparse warning fixes
Fix a bunch of sparse warnings. Mostly about 0 used as NULL pointer, and shadowed variable declarations. One notable case was that hash size should have been unsigned. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
de83c058af
commit
cfcabdcc2d
@@ -780,7 +780,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf)
|
||||
int i = 0;
|
||||
const char *p;
|
||||
const int max_netdevices = 8*PAGE_SIZE;
|
||||
long *inuse;
|
||||
unsigned long *inuse;
|
||||
struct net_device *d;
|
||||
|
||||
p = strnchr(name, IFNAMSIZ-1, '%');
|
||||
@@ -794,7 +794,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf)
|
||||
return -EINVAL;
|
||||
|
||||
/* Use one page as a bit array of possible slots */
|
||||
inuse = (long *) get_zeroed_page(GFP_ATOMIC);
|
||||
inuse = (unsigned long *) get_zeroed_page(GFP_ATOMIC);
|
||||
if (!inuse)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Reference in New Issue
Block a user