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 | |
| 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')
| -rw-r--r-- | net/dccp/ackvec.h | 21 | ||||
| -rw-r--r-- | net/dccp/ccid.h | 18 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/loss_interval.h | 8 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/packet_history.h | 25 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/tfrc.h | 22 | ||||
| -rw-r--r-- | net/dccp/dccp.h | 186 | ||||
| -rw-r--r-- | net/dccp/feat.h | 26 |
7 files changed, 148 insertions, 158 deletions
diff --git a/net/dccp/ackvec.h b/net/dccp/ackvec.h index a269aa7f7923..3284bfa988c0 100644 --- a/net/dccp/ackvec.h +++ b/net/dccp/ackvec.h | |||
| @@ -101,16 +101,16 @@ struct dccp_ackvec_record { | |||
| 101 | u8 avr_ack_nonce:1; | 101 | u8 avr_ack_nonce:1; |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | extern int dccp_ackvec_init(void); | 104 | int dccp_ackvec_init(void); |
| 105 | extern void dccp_ackvec_exit(void); | 105 | void dccp_ackvec_exit(void); |
| 106 | 106 | ||
| 107 | extern struct dccp_ackvec *dccp_ackvec_alloc(const gfp_t priority); | 107 | struct dccp_ackvec *dccp_ackvec_alloc(const gfp_t priority); |
| 108 | extern void dccp_ackvec_free(struct dccp_ackvec *av); | 108 | void dccp_ackvec_free(struct dccp_ackvec *av); |
| 109 | 109 | ||
| 110 | extern void dccp_ackvec_input(struct dccp_ackvec *av, struct sk_buff *skb); | 110 | void dccp_ackvec_input(struct dccp_ackvec *av, struct sk_buff *skb); |
| 111 | extern int dccp_ackvec_update_records(struct dccp_ackvec *av, u64 seq, u8 sum); | 111 | int dccp_ackvec_update_records(struct dccp_ackvec *av, u64 seq, u8 sum); |
| 112 | extern void dccp_ackvec_clear_state(struct dccp_ackvec *av, const u64 ackno); | 112 | void dccp_ackvec_clear_state(struct dccp_ackvec *av, const u64 ackno); |
| 113 | extern u16 dccp_ackvec_buflen(const struct dccp_ackvec *av); | 113 | u16 dccp_ackvec_buflen(const struct dccp_ackvec *av); |
| 114 | 114 | ||
| 115 | static inline bool dccp_ackvec_is_empty(const struct dccp_ackvec *av) | 115 | static inline bool dccp_ackvec_is_empty(const struct dccp_ackvec *av) |
| 116 | { | 116 | { |
| @@ -133,7 +133,6 @@ struct dccp_ackvec_parsed { | |||
| 133 | struct list_head node; | 133 | struct list_head node; |
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | extern int dccp_ackvec_parsed_add(struct list_head *head, | 136 | int dccp_ackvec_parsed_add(struct list_head *head, u8 *vec, u8 len, u8 nonce); |
| 137 | u8 *vec, u8 len, u8 nonce); | 137 | void dccp_ackvec_parsed_cleanup(struct list_head *parsed_chunks); |
| 138 | extern void dccp_ackvec_parsed_cleanup(struct list_head *parsed_chunks); | ||
| 139 | #endif /* _ACKVEC_H */ | 138 | #endif /* _ACKVEC_H */ |
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index fb85d371a8de..6eb837a47b5c 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h | |||
| @@ -93,8 +93,8 @@ extern struct ccid_operations ccid2_ops; | |||
| 93 | extern struct ccid_operations ccid3_ops; | 93 | extern struct ccid_operations ccid3_ops; |
| 94 | #endif | 94 | #endif |
| 95 | 95 | ||
| 96 | extern int ccid_initialize_builtins(void); | 96 | int ccid_initialize_builtins(void); |
| 97 | extern void ccid_cleanup_builtins(void); | 97 | void ccid_cleanup_builtins(void); |
| 98 | 98 | ||
| 99 | struct ccid { | 99 | struct ccid { |
| 100 | struct ccid_operations *ccid_ops; | 100 | struct ccid_operations *ccid_ops; |
| @@ -106,12 +106,12 @@ static inline void *ccid_priv(const struct ccid *ccid) | |||
| 106 | return (void *)ccid->ccid_priv; | 106 | return (void *)ccid->ccid_priv; |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | extern bool ccid_support_check(u8 const *ccid_array, u8 array_len); | 109 | bool ccid_support_check(u8 const *ccid_array, u8 array_len); |
| 110 | extern int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len); | 110 | int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len); |
| 111 | extern int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, | 111 | int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, |
| 112 | char __user *, int __user *); | 112 | char __user *, int __user *); |
| 113 | 113 | ||
| 114 | extern struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx); | 114 | struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx); |
| 115 | 115 | ||
| 116 | static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp) | 116 | static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp) |
| 117 | { | 117 | { |
| @@ -131,8 +131,8 @@ static inline int ccid_get_current_tx_ccid(struct dccp_sock *dp) | |||
| 131 | return ccid->ccid_ops->ccid_id; | 131 | return ccid->ccid_ops->ccid_id; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | extern void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk); | 134 | void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk); |
| 135 | extern void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk); | 135 | void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk); |
| 136 | 136 | ||
| 137 | /* | 137 | /* |
| 138 | * Congestion control of queued data packets via CCID decision. | 138 | * Congestion control of queued data packets via CCID decision. |
diff --git a/net/dccp/ccids/lib/loss_interval.h b/net/dccp/ccids/lib/loss_interval.h index d1d2f5383b7d..57f631a86ccd 100644 --- a/net/dccp/ccids/lib/loss_interval.h +++ b/net/dccp/ccids/lib/loss_interval.h | |||
| @@ -65,9 +65,9 @@ static inline u8 tfrc_lh_length(struct tfrc_loss_hist *lh) | |||
| 65 | 65 | ||
| 66 | struct tfrc_rx_hist; | 66 | struct tfrc_rx_hist; |
| 67 | 67 | ||
| 68 | extern int tfrc_lh_interval_add(struct tfrc_loss_hist *, struct tfrc_rx_hist *, | 68 | int tfrc_lh_interval_add(struct tfrc_loss_hist *, struct tfrc_rx_hist *, |
| 69 | u32 (*first_li)(struct sock *), struct sock *); | 69 | u32 (*first_li)(struct sock *), struct sock *); |
| 70 | extern u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *); | 70 | u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *); |
| 71 | extern void tfrc_lh_cleanup(struct tfrc_loss_hist *lh); | 71 | void tfrc_lh_cleanup(struct tfrc_loss_hist *lh); |
| 72 | 72 | ||
| 73 | #endif /* _DCCP_LI_HIST_ */ | 73 | #endif /* _DCCP_LI_HIST_ */ |
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h index 7ee4a9d9d335..ee362b0b630d 100644 --- a/net/dccp/ccids/lib/packet_history.h +++ b/net/dccp/ccids/lib/packet_history.h | |||
| @@ -60,8 +60,8 @@ static inline struct tfrc_tx_hist_entry * | |||
| 60 | return head; | 60 | return head; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | extern int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno); | 63 | int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno); |
| 64 | extern void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp); | 64 | void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp); |
| 65 | 65 | ||
| 66 | /* Subtraction a-b modulo-16, respects circular wrap-around */ | 66 | /* Subtraction a-b modulo-16, respects circular wrap-around */ |
| 67 | #define SUB16(a, b) (((a) + 16 - (b)) & 0xF) | 67 | #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 | return h->loss_count > 0; | 139 | return h->loss_count > 0; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | extern void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, | 142 | void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, const struct sk_buff *skb, |
| 143 | const struct sk_buff *skb, const u64 ndp); | 143 | const u64 ndp); |
| 144 | 144 | ||
| 145 | extern int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb); | 145 | int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb); |
| 146 | 146 | ||
| 147 | struct tfrc_loss_hist; | 147 | struct tfrc_loss_hist; |
| 148 | extern int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, | 148 | int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, struct tfrc_loss_hist *lh, |
| 149 | struct tfrc_loss_hist *lh, | 149 | struct sk_buff *skb, const u64 ndp, |
| 150 | struct sk_buff *skb, const u64 ndp, | 150 | u32 (*first_li)(struct sock *sk), struct sock *sk); |
| 151 | u32 (*first_li)(struct sock *sk), | 151 | u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, const struct sk_buff *skb); |
| 152 | struct sock *sk); | 152 | int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h); |
| 153 | extern u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, | 153 | void tfrc_rx_hist_purge(struct tfrc_rx_hist *h); |
| 154 | const struct sk_buff *skb); | ||
| 155 | extern int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h); | ||
| 156 | extern void tfrc_rx_hist_purge(struct tfrc_rx_hist *h); | ||
| 157 | 154 | ||
| 158 | #endif /* _DCCP_PKT_HIST_ */ | 155 | #endif /* _DCCP_PKT_HIST_ */ |
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h index ed698c42a5fb..40ee7d62b652 100644 --- a/net/dccp/ccids/lib/tfrc.h +++ b/net/dccp/ccids/lib/tfrc.h | |||
| @@ -55,21 +55,21 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight) | |||
| 55 | return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; | 55 | return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); | 58 | u32 tfrc_calc_x(u16 s, u32 R, u32 p); |
| 59 | extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); | 59 | u32 tfrc_calc_x_reverse_lookup(u32 fvalue); |
| 60 | extern u32 tfrc_invert_loss_event_rate(u32 loss_event_rate); | 60 | u32 tfrc_invert_loss_event_rate(u32 loss_event_rate); |
| 61 | 61 | ||
| 62 | extern int tfrc_tx_packet_history_init(void); | 62 | int tfrc_tx_packet_history_init(void); |
| 63 | extern void tfrc_tx_packet_history_exit(void); | 63 | void tfrc_tx_packet_history_exit(void); |
| 64 | extern int tfrc_rx_packet_history_init(void); | 64 | int tfrc_rx_packet_history_init(void); |
| 65 | extern void tfrc_rx_packet_history_exit(void); | 65 | void tfrc_rx_packet_history_exit(void); |
| 66 | 66 | ||
| 67 | extern int tfrc_li_init(void); | 67 | int tfrc_li_init(void); |
| 68 | extern void tfrc_li_exit(void); | 68 | void tfrc_li_exit(void); |
| 69 | 69 | ||
| 70 | #ifdef CONFIG_IP_DCCP_TFRC_LIB | 70 | #ifdef CONFIG_IP_DCCP_TFRC_LIB |
| 71 | extern int tfrc_lib_init(void); | 71 | int tfrc_lib_init(void); |
| 72 | extern void tfrc_lib_exit(void); | 72 | void tfrc_lib_exit(void); |
| 73 | #else | 73 | #else |
| 74 | #define tfrc_lib_init() (0) | ||
