diff options
author | Joe Perches <joe@perches.com> | 2013-10-18 16:48:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-19 19:12:11 -0400 |
commit | a402a5aa9b4cbb42cc41bf573d2e5c4713541af0 (patch) | |
tree | b00fd8bc04ef28bf384c21641d1a634b77e8c29d /net/dccp/dccp.h | |
parent | 348662a1429f95ed2d488c939c324ec152638742 (diff) |
net: dccp: 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 'net/dccp/dccp.h')
-rw-r--r-- | net/dccp/dccp.h | 186 |
1 files changed, 90 insertions, 96 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 708e75bf623d..30948784dd58 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -53,7 +53,7 @@ extern struct inet_hashinfo dccp_hashinfo; | |||
53 | 53 | ||
54 | extern struct percpu_counter dccp_orphan_count; | 54 | extern struct percpu_counter dccp_orphan_count; |
55 | 55 | ||
56 | extern void dccp_time_wait(struct sock *sk, int state, int timeo); | 56 | void dccp_time_wait(struct sock *sk, int state, int timeo); |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Set safe upper bounds for header and option length. Since Data Offset is 8 | 59 | * Set safe upper bounds for header and option length. Since Data Offset is 8 |
@@ -224,114 +224,108 @@ static inline void dccp_csum_outgoing(struct sk_buff *skb) | |||
224 | skb->csum = skb_checksum(skb, 0, (cov > skb->len)? skb->len : cov, 0); | 224 | skb->csum = skb_checksum(skb, 0, (cov > skb->len)? skb->len : cov, 0); |
225 | } | 225 | } |
226 | 226 | ||
227 | extern void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb); | 227 | void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb); |
228 | 228 | ||
229 | extern int dccp_retransmit_skb(struct sock *sk); | 229 | int dccp_retransmit_skb(struct sock *sk); |
230 | 230 | ||
231 | extern void dccp_send_ack(struct sock *sk); | 231 | void dccp_send_ack(struct sock *sk); |
232 | extern void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, | 232 | void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, |
233 | struct request_sock *rsk); | 233 | struct request_sock *rsk); |
234 | 234 | ||
235 | extern void dccp_send_sync(struct sock *sk, const u64 seq, | 235 | void dccp_send_sync(struct sock *sk, const u64 seq, |
236 | const enum dccp_pkt_type pkt_type); | 236 | const enum dccp_pkt_type pkt_type); |
237 | 237 | ||
238 | /* | 238 | /* |
239 | * TX Packet Dequeueing Interface | 239 | * TX Packet Dequeueing Interface |
240 | */ | 240 | */ |
241 | extern void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb); | 241 | void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb); |
242 | extern bool dccp_qpolicy_full(struct sock *sk); | 242 | bool dccp_qpolicy_full(struct sock *sk); |
243 | extern void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb); | 243 | void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb); |
244 | extern struct sk_buff *dccp_qpolicy_top(struct sock *sk); | 244 | struct sk_buff *dccp_qpolicy_top(struct sock *sk); |
245 | extern struct sk_buff *dccp_qpolicy_pop(struct sock *sk); | 245 | struct sk_buff *dccp_qpolicy_pop(struct sock *sk); |
246 | extern bool dccp_qpolicy_param_ok(struct sock *sk, __be32 param); | 246 | bool dccp_qpolicy_param_ok(struct sock *sk, __be32 param); |
247 | 247 | ||
248 | /* | 248 | /* |
249 | * TX Packet Output and TX Timers | 249 | * TX Packet Output and TX Timers |
250 | */ | 250 | */ |
251 | extern void dccp_write_xmit(struct sock *sk); | 251 | void dccp_write_xmit(struct sock *sk); |
252 | extern void dccp_write_space(struct sock *sk); | 252 | void dccp_write_space(struct sock *sk); |
253 | extern void dccp_flush_write_queue(struct sock *sk, long *time_budget); | 253 | void dccp_flush_write_queue(struct sock *sk, long *time_budget); |
254 | 254 | ||
255 | extern void dccp_init_xmit_timers(struct sock *sk); | 255 | void dccp_init_xmit_timers(struct sock *sk); |
256 | static inline void dccp_clear_xmit_timers(struct sock *sk) | 256 | static inline void dccp_clear_xmit_timers(struct sock *sk) |
257 | { | 257 | { |
258 | inet_csk_clear_xmit_timers(sk); | 258 | inet_csk_clear_xmit_timers(sk); |
259 | } | 259 | } |
260 | 260 | ||
261 | extern unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu); | 261 | unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu); |
262 | 262 | ||
263 | extern const char *dccp_packet_name(const int type); | 263 | const char *dccp_packet_name(const int type); |
264 | 264 | ||
265 | extern void dccp_set_state(struct sock *sk, const int state); | 265 | void dccp_set_state(struct sock *sk, const int state); |
266 | extern void dccp_done(struct sock *sk); | 266 | void dccp_done(struct sock *sk); |
267 | 267 | ||
268 | extern int dccp_reqsk_init(struct request_sock *rq, struct dccp_sock const *dp, | 268 | int dccp_reqsk_init(struct request_sock *rq, struct dccp_sock const *dp, |
269 | struct sk_buff const *skb); | 269 | struct sk_buff const *skb); |
270 | 270 | ||
271 | extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb); | 271 | int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb); |
272 | 272 | ||
273 | extern struct sock *dccp_create_openreq_child(struct sock *sk, | 273 | struct sock *dccp_create_openreq_child(struct sock *sk, |
274 | const struct request_sock *req, | 274 | const struct request_sock *req, |
275 | const struct sk_buff *skb); | 275 | const struct sk_buff *skb); |
276 | 276 | ||
277 | extern int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb); | 277 | int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb); |
278 | 278 | ||
279 | extern struct sock *dccp_v4_request_recv_sock(struct sock *sk, | 279 | struct sock *dccp_v4_request_recv_sock(struct sock *sk, struct sk_buff *skb, |
280 | struct sk_buff *skb, | 280 | struct request_sock *req, |
281 | struct request_sock *req, | 281 | struct dst_entry *dst); |
282 | struct dst_entry *dst); | 282 | struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, |
283 | extern struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, | 283 | struct request_sock *req, |
284 | struct request_sock *req, | 284 | struct request_sock **prev); |
285 | struct request_sock **prev); | ||
286 | 285 | ||
287 | extern int dccp_child_process(struct sock *parent, struct sock *child, | 286 | int dccp_child_process(struct sock *parent, struct sock *child, |
288 | struct sk_buff *skb); | 287 | struct sk_buff *skb); |
289 | extern int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | 288 | int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
290 | struct dccp_hdr *dh, unsigned int len); | 289 | struct dccp_hdr *dh, unsigned int len); |
291 | extern int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, | 290 | int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, |
292 | const struct dccp_hdr *dh, const unsigned int len); | 291 | const struct dccp_hdr *dh, const unsigned int len); |
293 | 292 | ||
294 | extern int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized); | 293 | int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized); |
295 | extern void dccp_destroy_sock(struct sock *sk); | 294 | void dccp_destroy_sock(struct sock *sk); |
296 | 295 | ||
297 | extern void dccp_close(struct sock *sk, long timeout); | 296 | void dccp_close(struct sock *sk, long timeout); |
298 | extern struct sk_buff *dccp_make_response(struct sock *sk, | 297 | struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst, |
299 | struct dst_entry *dst, | 298 | struct request_sock *req); |
300 | struct request_sock *req); | ||
301 | 299 | ||
302 | extern int dccp_connect(struct sock *sk); | 300 | int dccp_connect(struct sock *sk); |
303 | extern int dccp_disconnect(struct sock *sk, int flags); | 301 | int dccp_disconnect(struct sock *sk, int flags); |
304 | extern int dccp_getsockopt(struct sock *sk, int level, int optname, | 302 | int dccp_getsockopt(struct sock *sk, int level, int optname, |
305 | char __user *optval, int __user *optlen); | 303 | char __user *optval, int __user *optlen); |
306 | extern int dccp_setsockopt(struct sock *sk, int level, int optname, | 304 | int dccp_setsockopt(struct sock *sk, int level, int optname, |
307 | char __user *optval, unsigned int optlen); | 305 | char __user *optval, unsigned int optlen); |
308 | #ifdef CONFIG_COMPAT | 306 | #ifdef CONFIG_COMPAT |
309 | extern int compat_dccp_getsockopt(struct sock *sk, | 307 | int compat_dccp_getsockopt(struct sock *sk, int level, int optname, |
310 | int level, int optname, | 308 | char __user *optval, int __user *optlen); |
311 | char __user *optval, int __user *optlen); | 309 | int compat_dccp_setsockopt(struct sock *sk, int level, int optname, |
312 | extern int compat_dccp_setsockopt(struct sock *sk, | 310 | char __user *optval, unsigned int optlen); |
313 | int level, int optname, | ||
314 | char __user *optval, unsigned int optlen); | ||
315 | #endif | 311 | #endif |
316 | extern int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 312 | int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
317 | extern int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, | 313 | int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
318 | struct msghdr *msg, size_t size); | 314 | size_t size); |
319 | extern int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, | 315 | int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, |
320 | struct msghdr *msg, size_t len, int nonblock, | 316 | struct msghdr *msg, size_t len, int nonblock, int flags, |
321 | int flags, int *addr_len); | 317 | int *addr_len); |
322 | extern void dccp_shutdown(struct sock *sk, int how); | 318 | void dccp_shutdown(struct sock *sk, int how); |
323 | extern int inet_dccp_listen(struct socket *sock, int backlog); | 319 | int inet_dccp_listen(struct socket *sock, int backlog); |
324 | extern unsigned int dccp_poll(struct file *file, struct socket *sock, | 320 | unsigned int dccp_poll(struct file *file, struct socket *sock, |
325 | poll_table *wait); | 321 | poll_table *wait); |
326 | extern int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, | 322 | int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
327 | int addr_len); | 323 | |
328 | 324 | struct sk_buff *dccp_ctl_make_reset(struct sock *sk, struct sk_buff *skb); | |
329 | extern struct sk_buff *dccp_ctl_make_reset(struct sock *sk, | 325 | int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code); |
330 | struct sk_buff *skb); | 326 | void dccp_send_close(struct sock *sk, const int active); |
331 | extern int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code); | 327 | int dccp_invalid_packet(struct sk_buff *skb); |
332 | extern void dccp_send_close(struct sock *sk, const int active); | 328 | u32 dccp_sample_rtt(struct sock *sk, long delta); |
333 | extern int dccp_invalid_packet(struct sk_buff *skb); | ||
334 | extern u32 dccp_sample_rtt(struct sock *sk, long delta); | ||
335 | 329 | ||
336 | static inline int dccp_bad_service_code(const struct sock *sk, | 330 | static inline int dccp_bad_service_code(const struct sock *sk, |
337 | const __be32 service) | 331 | const __be32 service) |
@@ -475,25 +469,25 @@ static inline int dccp_ack_pending(const struct sock *sk) | |||
475 | return dccp_ackvec_pending(sk) || inet_csk_ack_scheduled(sk); | 469 | return dccp_ackvec_pending(sk) || inet_csk_ack_scheduled(sk); |
476 | } | 470 | } |
477 | 471 | ||
478 | extern int dccp_feat_signal_nn_change(struct sock *sk, u8 feat, u64 nn_val); | 472 | int dccp_feat_signal_nn_change(struct sock *sk, u8 feat, u64 nn_val); |
479 | extern int dccp_feat_finalise_settings(struct dccp_sock *dp); | 473 | int dccp_feat_finalise_settings(struct dccp_sock *dp); |
480 | extern int dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq); | 474 | int dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq); |
481 | extern int dccp_feat_insert_opts(struct dccp_sock*, struct dccp_request_sock*, | 475 | int dccp_feat_insert_opts(struct dccp_sock*, struct dccp_request_sock*, |
482 | struct sk_buff *skb); | 476 | struct sk_buff *skb); |
483 | extern int dccp_feat_activate_values(struct sock *sk, struct list_head *fn); | 477 | int dccp_feat_activate_values(struct sock *sk, struct list_head *fn); |
484 | extern void dccp_feat_list_purge(struct list_head *fn_list); | 478 | void dccp_feat_list_purge(struct list_head *fn_list); |
485 | 479 | ||
486 | extern int dccp_insert_options(struct sock *sk, struct sk_buff *skb); | 480 | int dccp_insert_options(struct sock *sk, struct sk_buff *skb); |
487 | extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*); | 481 | int dccp_insert_options_rsk(struct dccp_request_sock *, struct sk_buff *); |
488 | extern int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed); | 482 | int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed); |
489 | extern u32 dccp_timestamp(void); | 483 | u32 dccp_timestamp(void); |
490 | extern void dccp_timestamping_init(void); | 484 | void dccp_timestamping_init(void); |
491 | extern int dccp_insert_option(struct sk_buff *skb, unsigned char option, | 485 | int dccp_insert_option(struct sk_buff *skb, unsigned char option, |
492 | const void *value, unsigned char len); | 486 | const void *value, unsigned char len); |
493 | 487 | ||
494 | #ifdef CONFIG_SYSCTL | 488 | #ifdef CONFIG_SYSCTL |
495 | extern int dccp_sysctl_init(void); | 489 | int dccp_sysctl_init(void); |
496 | extern void dccp_sysctl_exit(void); | 490 | void dccp_sysctl_exit(void); |
497 | #else | 491 | #else |
498 | static inline int dccp_sysctl_init(void) | 492 | static inline int dccp_sysctl_init(void) |
499 | { | 493 | { |