aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-09 04:59:42 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:54:48 -0400
commitcfcabdcc2d5a810208e5bb3974121b7ed60119aa (patch)
tree1aed711eeecc5a303b57f1fc47e1b5746e8a72c2 /net/core/dev.c
parentde83c058af25aa97ed4864abab11e90e8dead6e2 (diff)
[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)
780 int i = 0; 780 int i = 0;
781 const char *p; 781 const char *p;
782 const int max_netdevices = 8*PAGE_SIZE; 782 const int max_netdevices = 8*PAGE_SIZE;
783 long *inuse; 783 unsigned long *inuse;
784 struct net_device *d; 784 struct net_device *d;
785 785
786 p = strnchr(name, IFNAMSIZ-1, '%'); 786 p = strnchr(name, IFNAMSIZ-1, '%');
@@ -794,7 +794,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf)
794 return -EINVAL; 794 return -EINVAL;
795 795
796 /* Use one page as a bit array of possible slots */ 796 /* Use one page as a bit array of possible slots */
797 inuse = (long *) get_zeroed_page(GFP_ATOMIC); 797 inuse = (unsigned long *) get_zeroed_page(GFP_ATOMIC);
798 if (!inuse) 798 if (!inuse)
799 return -ENOMEM; 799 return -ENOMEM;
800 800