diff options
author | Florian Westphal <fw@strlen.de> | 2014-07-24 10:50:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-28 01:34:35 -0400 |
commit | 36c7778218b93d96d88d68f116a711f6a598b72f (patch) | |
tree | 39b39a0f448c249d1c9eb61e72cadea2348698ba /net/ipv4 | |
parent | ac3d2e5a9ef2f4d8f57c50070c4883ecb7cec29f (diff) |
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 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_fragment.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index ed32313e307c..586e6aaf9e6e 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -112,18 +112,18 @@ static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot) | |||
112 | ip4_frags.rnd) & (INETFRAGS_HASHSZ - 1); | 112 | ip4_frags.rnd) & (INETFRAGS_HASHSZ - 1); |
113 | } | 113 | } |
114 | 114 | ||
115 | static unsigned int ip4_hashfn(struct inet_frag_queue *q) | 115 | static unsigned int ip4_hashfn(const struct inet_frag_queue *q) |
116 | { | 116 | { |
117 | struct ipq *ipq; | 117 | const struct ipq *ipq; |
118 | 118 | ||
119 | ipq = container_of(q, struct ipq, q); | 119 | ipq = container_of(q, struct ipq, q); |
120 | return ipqhashfn(ipq->id, ipq->saddr, ipq->daddr, ipq->protocol); | 120 | return ipqhashfn(ipq->id, ipq->saddr, ipq->daddr, ipq->protocol); |
121 | } | 121 | } |
122 | 122 | ||
123 | static bool ip4_frag_match(struct inet_frag_queue *q, void *a) | 123 | static bool ip4_frag_match(const struct inet_frag_queue *q, const void *a) |
124 | { | 124 | { |
125 | struct ipq *qp; | 125 | const struct ipq *qp; |
126 | struct ip4_create_arg *arg = a; | 126 | const struct ip4_create_arg *arg = a; |
127 | 127 | ||
128 | qp = container_of(q, struct ipq, q); | 128 | qp = container_of(q, struct ipq, q); |
129 | return qp->id == arg->iph->id && | 129 | return qp->id == arg->iph->id && |
@@ -133,14 +133,14 @@ static bool ip4_frag_match(struct inet_frag_queue *q, void *a) | |||
133 | qp->user == arg->user; | 133 | qp->user == arg->user; |
134 | } | 134 | } |
135 | 135 | ||
136 | static void ip4_frag_init(struct inet_frag_queue *q, void *a) | 136 | static void ip4_frag_init(struct inet_frag_queue *q, const void *a) |
137 | { | 137 | { |
138 | struct ipq *qp = container_of(q, struct ipq, q); | 138 | struct ipq *qp = container_of(q, struct ipq, q); |
139 | struct netns_ipv4 *ipv4 = container_of(q->net, struct netns_ipv4, | 139 | struct netns_ipv4 *ipv4 = container_of(q->net, struct netns_ipv4, |
140 | frags); | 140 | frags); |
141 | struct net *net = container_of(ipv4, struct net, ipv4); | 141 | struct net *net = container_of(ipv4, struct net, ipv4); |
142 | 142 | ||
143 | struct ip4_create_arg *arg = a; | 143 | const struct ip4_create_arg *arg = a; |
144 | 144 | ||
145 | qp->protocol = arg->iph->protocol; | 145 | qp->protocol = arg->iph->protocol; |
146 | qp->id = arg->iph->id; | 146 | qp->id = arg->iph->id; |