diff options
author | Florian Westphal <fw@strlen.de> | 2014-07-24 18:50:29 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-28 09:34:35 +0400 |
commit | 36c7778218b93d96d88d68f116a711f6a598b72f (patch) | |
tree | 39b39a0f448c249d1c9eb61e72cadea2348698ba /include/net/inet_frag.h | |
parent | ac3d2e5a9ef2f4d8f57c50070c4883ecb7cec29f (diff) | |
download | linux-36c7778218b93d96d88d68f116a711f6a598b72f.tar.xz |
inet: frag: constify match, hashfn and constructor arguments
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_frag.h')
-rw-r--r-- | include/net/inet_frag.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 6f59de98dabd..15033057d44e 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -71,10 +71,11 @@ struct inet_frags { u32 rnd; int qsize; - unsigned int (*hashfn)(struct inet_frag_queue *); - bool (*match)(struct inet_frag_queue *q, void *arg); + unsigned int (*hashfn)(const struct inet_frag_queue *); + bool (*match)(const struct inet_frag_queue *q, + const void *arg); void (*constructor)(struct inet_frag_queue *q, - void *arg); + const void *arg); void (*destructor)(struct inet_frag_queue *); void (*skb_free)(struct sk_buff *); void (*frag_expire)(unsigned long data); @@ -131,9 +132,9 @@ static inline void init_frag_mem_limit(struct netns_frags *nf) percpu_counter_init(&nf->mem, 0); } -static inline int sum_frag_mem_limit(struct netns_frags *nf) +static inline unsigned int sum_frag_mem_limit(struct netns_frags *nf) { - int res; + unsigned int res; local_bh_disable(); res = percpu_counter_sum_positive(&nf->mem); |