Commit:     96eb24d770381b8a257b26183f6b6c131ad51ab9
Parent:     06aa10728e36265cce82a53de025ad1aa672b2b0
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 31 04:07:29 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Jan 31 19:27:44 2008 -0800

    [NETFILTER]: nf_conntrack: sparse warnings
    The hashtable size is really unsigned so sparse complains when you pass
    a signed integer.  Change all uses to make it consistent.
    Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 include/net/netfilter/nf_conntrack.h |    4 ++--
 net/netfilter/nf_conntrack_core.c    |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/net/netfilter/nf_conntrack.h 
index 857d899..dada041 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -171,9 +171,9 @@ static inline void nf_ct_put(struct nf_conn *ct)
 extern int nf_ct_l3proto_try_module_get(unsigned short l3proto);
 extern void nf_ct_l3proto_module_put(unsigned short l3proto);
-extern struct hlist_head *nf_ct_alloc_hashtable(int *sizep, int *vmalloced);
+extern struct hlist_head *nf_ct_alloc_hashtable(unsigned int *sizep, int 
 extern void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced,
-                                int size);
+                                unsigned int size);
 extern struct nf_conntrack_tuple_hash *
 __nf_conntrack_find(const struct nf_conntrack_tuple *tuple,
diff --git a/net/netfilter/nf_conntrack_core.c 
index 078fff0..7b1f7e8 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -939,7 +939,7 @@ static int kill_all(struct nf_conn *i, void *data)
        return 1;
-void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced, int size)
+void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced, unsigned int 
        if (vmalloced)
@@ -988,7 +988,7 @@ void nf_conntrack_cleanup(void)
-struct hlist_head *nf_ct_alloc_hashtable(int *sizep, int *vmalloced)
+struct hlist_head *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced)
        struct hlist_head *hash;
        unsigned int size, i;
@@ -1015,8 +1015,8 @@ EXPORT_SYMBOL_GPL(nf_ct_alloc_hashtable);
 int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
-       int i, bucket, hashsize, vmalloced;
-       int old_vmalloced, old_size;
+       int i, bucket, vmalloced, old_vmalloced;
+       unsigned int hashsize, old_size;
        int rnd;
        struct hlist_head *hash, *old_hash;
        struct nf_conntrack_tuple_hash *h;
@@ -1025,7 +1025,7 @@ int nf_conntrack_set_hashsize(const char *val, struct 
kernel_param *kp)
        if (!nf_conntrack_htable_size)
                return param_set_uint(val, kp);
-       hashsize = simple_strtol(val, NULL, 0);
+       hashsize = simple_strtoul(val, NULL, 0);
        if (!hashsize)
                return -EINVAL;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to