Commit a402a5aa authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 348662a1
...@@ -101,16 +101,16 @@ struct dccp_ackvec_record { ...@@ -101,16 +101,16 @@ struct dccp_ackvec_record {
u8 avr_ack_nonce:1; u8 avr_ack_nonce:1;
}; };
extern int dccp_ackvec_init(void); int dccp_ackvec_init(void);
extern void dccp_ackvec_exit(void); void dccp_ackvec_exit(void);
extern struct dccp_ackvec *dccp_ackvec_alloc(const gfp_t priority); struct dccp_ackvec *dccp_ackvec_alloc(const gfp_t priority);
extern void dccp_ackvec_free(struct dccp_ackvec *av); void dccp_ackvec_free(struct dccp_ackvec *av);
extern void dccp_ackvec_input(struct dccp_ackvec *av, struct sk_buff *skb); void dccp_ackvec_input(struct dccp_ackvec *av, struct sk_buff *skb);
extern int dccp_ackvec_update_records(struct dccp_ackvec *av, u64 seq, u8 sum); int dccp_ackvec_update_records(struct dccp_ackvec *av, u64 seq, u8 sum);
extern void dccp_ackvec_clear_state(struct dccp_ackvec *av, const u64 ackno); void dccp_ackvec_clear_state(struct dccp_ackvec *av, const u64 ackno);
extern u16 dccp_ackvec_buflen(const struct dccp_ackvec *av); u16 dccp_ackvec_buflen(const struct dccp_ackvec *av);
static inline bool dccp_ackvec_is_empty(const struct dccp_ackvec *av) static inline bool dccp_ackvec_is_empty(const struct dccp_ackvec *av)
{ {
...@@ -133,7 +133,6 @@ struct dccp_ackvec_parsed { ...@@ -133,7 +133,6 @@ struct dccp_ackvec_parsed {
struct list_head node; struct list_head node;
}; };
extern int dccp_ackvec_parsed_add(struct list_head *head, int dccp_ackvec_parsed_add(struct list_head *head, u8 *vec, u8 len, u8 nonce);
u8 *vec, u8 len, u8 nonce); void dccp_ackvec_parsed_cleanup(struct list_head *parsed_chunks);
extern void dccp_ackvec_parsed_cleanup(struct list_head *parsed_chunks);
#endif /* _ACKVEC_H */ #endif /* _ACKVEC_H */
...@@ -93,8 +93,8 @@ extern struct ccid_operations ccid2_ops; ...@@ -93,8 +93,8 @@ extern struct ccid_operations ccid2_ops;
extern struct ccid_operations ccid3_ops; extern struct ccid_operations ccid3_ops;
#endif #endif
extern int ccid_initialize_builtins(void); int ccid_initialize_builtins(void);
extern void ccid_cleanup_builtins(void); void ccid_cleanup_builtins(void);
struct ccid { struct ccid {
struct ccid_operations *ccid_ops; struct ccid_operations *ccid_ops;
...@@ -106,12 +106,12 @@ static inline void *ccid_priv(const struct ccid *ccid) ...@@ -106,12 +106,12 @@ static inline void *ccid_priv(const struct ccid *ccid)
return (void *)ccid->ccid_priv; return (void *)ccid->ccid_priv;
} }
extern bool ccid_support_check(u8 const *ccid_array, u8 array_len); bool ccid_support_check(u8 const *ccid_array, u8 array_len);
extern int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len); int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len);
extern int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, int ccid_getsockopt_builtin_ccids(struct sock *sk, int len,
char __user *, int __user *); char __user *, int __user *);
extern struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx); struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx);
static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp) static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp)
{ {
...@@ -131,8 +131,8 @@ static inline int ccid_get_current_tx_ccid(struct dccp_sock *dp) ...@@ -131,8 +131,8 @@ static inline int ccid_get_current_tx_ccid(struct dccp_sock *dp)
return ccid->ccid_ops->ccid_id; return ccid->ccid_ops->ccid_id;
} }
extern void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk); void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk);
extern void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk); void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk);
/* /*
* Congestion control of queued data packets via CCID decision. * Congestion control of queued data packets via CCID decision.
......
...@@ -65,9 +65,9 @@ static inline u8 tfrc_lh_length(struct tfrc_loss_hist *lh) ...@@ -65,9 +65,9 @@ static inline u8 tfrc_lh_length(struct tfrc_loss_hist *lh)
struct tfrc_rx_hist; struct tfrc_rx_hist;
extern int tfrc_lh_interval_add(struct tfrc_loss_hist *, struct tfrc_rx_hist *, int tfrc_lh_interval_add(struct tfrc_loss_hist *, struct tfrc_rx_hist *,
u32 (*first_li)(struct sock *), struct sock *); u32 (*first_li)(struct sock *), struct sock *);
extern u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *); u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *);
extern void tfrc_lh_cleanup(struct tfrc_loss_hist *lh); void tfrc_lh_cleanup(struct tfrc_loss_hist *lh);
#endif /* _DCCP_LI_HIST_ */ #endif /* _DCCP_LI_HIST_ */
...@@ -60,8 +60,8 @@ static inline struct tfrc_tx_hist_entry * ...@@ -60,8 +60,8 @@ static inline struct tfrc_tx_hist_entry *
return head; return head;
} }
extern int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno); int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno);
extern void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp); void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp);
/* Subtraction a-b modulo-16, respects circular wrap-around */ /* Subtraction a-b modulo-16, respects circular wrap-around */
#define SUB16(a, b) (((a) + 16 - (b)) & 0xF) #define SUB16(a, b) (((a) + 16 - (b)) & 0xF)
...@@ -139,20 +139,17 @@ static inline bool tfrc_rx_hist_loss_pending(const struct tfrc_rx_hist *h) ...@@ -139,20 +139,17 @@ static inline bool tfrc_rx_hist_loss_pending(const struct tfrc_rx_hist *h)
return h->loss_count > 0; return h->loss_count > 0;
} }
extern void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, const struct sk_buff *skb,
const struct sk_buff *skb, const u64 ndp); const u64 ndp);
extern int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb); int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb);
struct tfrc_loss_hist; struct tfrc_loss_hist;
extern int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, struct tfrc_loss_hist *lh,
struct tfrc_loss_hist *lh, struct sk_buff *skb, const u64 ndp,
struct sk_buff *skb, const u64 ndp, u32 (*first_li)(struct sock *sk), struct sock *sk);
u32 (*first_li)(struct sock *sk), u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, const struct sk_buff *skb);
struct sock *sk); int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h);
extern u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, void tfrc_rx_hist_purge(struct tfrc_rx_hist *h);
const struct sk_buff *skb);
extern int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h);
extern void tfrc_rx_hist_purge(struct tfrc_rx_hist *h);
#endif /* _DCCP_PKT_HIST_ */ #endif /* _DCCP_PKT_HIST_ */
...@@ -55,21 +55,21 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight) ...@@ -55,21 +55,21 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight)
return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval;
} }
extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); u32 tfrc_calc_x(u16 s, u32 R, u32 p);
extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); u32 tfrc_calc_x_reverse_lookup(u32 fvalue);
extern u32 tfrc_invert_loss_event_rate(u32 loss_event_rate); u32 tfrc_invert_loss_event_rate(u32 loss_event_rate);
extern int tfrc_tx_packet_history_init(void); int tfrc_tx_packet_history_init(void);
extern void tfrc_tx_packet_history_exit(void); void tfrc_tx_packet_history_exit(void);
extern int tfrc_rx_packet_history_init(void); int tfrc_rx_packet_history_init(void);
extern void tfrc_rx_packet_history_exit(void); void tfrc_rx_packet_history_exit(void);
extern int tfrc_li_init(void); int tfrc_li_init(void);
extern void tfrc_li_exit(void); void tfrc_li_exit(void);
#ifdef CONFIG_IP_DCCP_TFRC_LIB #ifdef CONFIG_IP_DCCP_TFRC_LIB
extern int tfrc_lib_init(void); int tfrc_lib_init(void);
extern void tfrc_lib_exit(void); void tfrc_lib_exit(void);
#else #else
#define tfrc_lib_init() (0) #define tfrc_lib_init() (0)
#define tfrc_lib_exit() #define tfrc_lib_exit()
......
This diff is collapsed.
...@@ -107,13 +107,13 @@ extern unsigned long sysctl_dccp_sequence_window; ...@@ -107,13 +107,13 @@ extern unsigned long sysctl_dccp_sequence_window;
extern int sysctl_dccp_rx_ccid; extern int sysctl_dccp_rx_ccid;
extern int sysctl_dccp_tx_ccid; extern int sysctl_dccp_tx_ccid;
extern int dccp_feat_init(struct sock *sk); int dccp_feat_init(struct sock *sk);
extern void dccp_feat_initialise_sysctls(void); void dccp_feat_initialise_sysctls(void);
extern int dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local, int dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local,
u8 const *list, u8 len); u8 const *list, u8 len);
extern int dccp_feat_parse_options(struct sock *, struct dccp_request_sock *, int dccp_feat_parse_options(struct sock *, struct dccp_request_sock *,
u8 mand, u8 opt, u8 feat, u8 *val, u8 len); u8 mand, u8 opt, u8 feat, u8 *val, u8 len);
extern int dccp_feat_clone_list(struct list_head const *, struct list_head *); int dccp_feat_clone_list(struct list_head const *, struct list_head *);
/* /*
* Encoding variable-length options and their maximum length. * Encoding variable-length options and their maximum length.
...@@ -127,11 +127,11 @@ extern int dccp_feat_clone_list(struct list_head const *, struct list_head *); ...@@ -127,11 +127,11 @@ extern int dccp_feat_clone_list(struct list_head const *, struct list_head *);
*/ */
#define DCCP_OPTVAL_MAXLEN 6 #define DCCP_OPTVAL_MAXLEN 6
extern void dccp_encode_value_var(const u64 value, u8 *to, const u8 len); void dccp_encode_value_var(const u64 value, u8 *to, const u8 len);
extern u64 dccp_decode_value_var(const u8 *bf, const u8 len); u64 dccp_decode_value_var(const u8 *bf, const u8 len);
extern u64 dccp_feat_nn_get(struct sock *sk, u8 feat); u64 dccp_feat_nn_get(struct sock *sk, u8 feat);
extern int dccp_insert_option_mandatory(struct sk_buff *skb); int dccp_insert_option_mandatory(struct sk_buff *skb);
extern int dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat, int dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat, u8 *val, u8 len,
u8 *val, u8 len, bool repeat_first); bool repeat_first);
#endif /* _DCCP_FEAT_H */ #endif /* _DCCP_FEAT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment