summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorStephen Hemminger2007-10-09 10:59:42 +0200
committerDavid S. Miller2007-10-11 01:54:48 +0200
commitcfcabdcc2d5a810208e5bb3974121b7ed60119aa (patch)
tree1aed711eeecc5a303b57f1fc47e1b5746e8a72c2 /net/core/dev.c
parent[TCP]: "Annotate" another fackets_out state reset (diff)
downloadkernel-qcow2-linux-cfcabdcc2d5a810208e5bb3974121b7ed60119aa.tar.gz
kernel-qcow2-linux-cfcabdcc2d5a810208e5bb3974121b7ed60119aa.tar.xz
kernel-qcow2-linux-cfcabdcc2d5a810208e5bb3974121b7ed60119aa.zip
[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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index d99864662582..13a1bc5d3bfd 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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;