aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_hashtables.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-09-21 13:22:41 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-21 14:01:38 -0400
commit1fd51155387264e3ca72094abadcaadb3f5969f6 (patch)
tree3764f7faaa6ff3e8511fb77049da5a6a50380cc0 /include/net/inet_hashtables.h
parente60ab84dd59cc0ddb46a7696a56f9de8b8b22f39 (diff)
inet*.h: Remove extern from function prototypes
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r--include/net/inet_hashtables.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index ef83d9e844b5..594dfeead70f 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -218,22 +218,21 @@ static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo)
218 } 218 }
219} 219}
220 220
221extern struct inet_bind_bucket * 221struct inet_bind_bucket *
222 inet_bind_bucket_create(struct kmem_cache *cachep, 222inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net,
223 struct net *net, 223 struct inet_bind_hashbucket *head,
224 struct inet_bind_hashbucket *head, 224 const unsigned short snum);
225 const unsigned short snum); 225void inet_bind_bucket_destroy(struct kmem_cache *cachep,
226extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, 226 struct inet_bind_bucket *tb);
227 struct inet_bind_bucket *tb); 227
228 228static inline int inet_bhashfn(struct net *net, const __u16 lport,
229static inline int inet_bhashfn(struct net *net, 229 const int bhash_size)
230 const __u16 lport, const int bhash_size)
231{ 230{
232 return (lport + net_hash_mix(net)) & (bhash_size - 1); 231 return (lport + net_hash_mix(net)) & (bhash_size - 1);
233} 232}
234 233
235extern void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, 234void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb,
236 const unsigned short snum); 235 const unsigned short snum);
237 236
238/* These can have wildcards, don't try too hard. */ 237/* These can have wildcards, don't try too hard. */
239static inline int inet_lhashfn(struct net *net, const unsigned short num) 238static inline int inet_lhashfn(struct net *net, const unsigned short num)
@@ -247,23 +246,22 @@ static inline int inet_sk_listen_hashfn(const struct sock *sk)
247} 246}
248 247
249/* Caller must disable local BH processing. */ 248/* Caller must disable local BH processing. */
250extern int __inet_inherit_port(struct sock *sk, struct sock *child); 249int __inet_inherit_port(struct sock *sk, struct sock *child);
251 250
252extern void inet_put_port(struct sock *sk); 251void inet_put_port(struct sock *sk);
253 252
254void inet_hashinfo_init(struct inet_hashinfo *h); 253void inet_hashinfo_init(struct inet_hashinfo *h);
255 254
256extern int __inet_hash_nolisten(struct sock *sk, struct inet_timewait_sock *tw); 255int __inet_hash_nolisten(struct sock *sk, struct inet_timewait_sock *tw);
257extern void inet_hash(struct sock *sk); 256void inet_hash(struct sock *sk);
258extern void inet_unhash(struct sock *sk); 257void inet_unhash(struct sock *sk);
259 258
260extern struct sock *__inet_lookup_listener(struct net *net, 259struct sock *__inet_lookup_listener(struct net *net,
261 struct inet_hashinfo *hashinfo, 260 struct inet_hashinfo *hashinfo,
262 const __be32 saddr, 261 const __be32 saddr, const __be16 sport,
263 const __be16 sport, 262 const __be32 daddr,
264 const __be32 daddr, 263 const unsigned short hnum,
265 const unsigned short hnum, 264 const int dif);
266 const int dif);
267 265
268static inline struct sock *inet_lookup_listener(struct net *net, 266static inline struct sock *inet_lookup_listener(struct net *net,
269 struct inet_hashinfo *hashinfo, 267 struct inet_hashinfo *hashinfo,
@@ -339,10 +337,11 @@ static inline struct sock *inet_lookup_listener(struct net *net,
339 * 337 *
340 * Local BH must be disabled here. 338 * Local BH must be disabled here.
341 */ 339 */
342extern struct sock * __inet_lookup_established(struct net *net, 340struct sock *__inet_lookup_established(struct net *net,
343 struct inet_hashinfo *hashinfo, 341 struct inet_hashinfo *hashinfo,
344 const __be32 saddr, const __be16 sport, 342 const __be32 saddr, const __be16 sport,
345 const __be32 daddr, const u16 hnum, const int dif); 343 const __be32 daddr, const u16 hnum,
344 const int dif);
346 345
347static inline struct sock * 346static inline struct sock *
348 inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, 347 inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo,
@@ -399,13 +398,14 @@ static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo,
399 iph->daddr, dport, inet_iif(skb)); 398 iph->daddr, dport, inet_iif(skb));
400} 399}
401 400
402extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, 401int __inet_hash_connect(struct inet_timewait_death_row *death_row,
403 struct sock *sk, 402 struct sock *sk, u32 port_offset,
404 u32 port_offset, 403 int (*check_established)(struct inet_timewait_death_row *,
405 int (*check_established)(struct inet_timewait_death_row *, 404 struct sock *, __u16,
406 struct sock *, __u16, struct inet_timewait_sock **), 405 struct inet_timewait_sock **),
407 int (*hash)(struct sock *sk, struct inet_timewait_sock *twp)); 406 int (*hash)(struct sock *sk,
407 struct inet_timewait_sock *twp));
408 408
409extern int inet_hash_connect(struct inet_timewait_death_row *death_row, 409int inet_hash_connect(struct inet_timewait_death_row *death_row,
410 struct sock *sk); 410 struct sock *sk);
411#endif /* _INET_HASHTABLES_H */ 411#endif /* _INET_HASHTABLES_H */