Skip to content

Commit bf3c710

Browse files
JoePerchesdavem330
authored andcommitted
llc*.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>
1 parent cb7d3d7 commit bf3c710

9 files changed

Lines changed: 253 additions & 333 deletions

File tree

‎include/net/llc.h‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -95,57 +95,57 @@ struct hlist_nulls_head *llc_sk_laddr_hash(struct llc_sap *sap,
9595
extern struct list_head llc_sap_list;
9696
extern spinlock_t llc_sap_list_lock;
9797

98-
extern int llc_rcv(struct sk_buff *skb, struct net_device *dev,
99-
struct packet_type *pt, struct net_device *orig_dev);
98+
int llc_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
99+
struct net_device *orig_dev);
100100

101-
extern int llc_mac_hdr_init(struct sk_buff *skb,
102-
const unsigned char *sa, const unsigned char *da);
101+
int llc_mac_hdr_init(struct sk_buff *skb, const unsigned char *sa,
102+
const unsigned char *da);
103103

104-
extern void llc_add_pack(int type, void (*handler)(struct llc_sap *sap,
105-
struct sk_buff *skb));
106-
extern void llc_remove_pack(int type);
104+
void llc_add_pack(int type,
105+
void (*handler)(struct llc_sap *sap, struct sk_buff *skb));
106+
void llc_remove_pack(int type);
107107

108-
extern void llc_set_station_handler(void (*handler)(struct sk_buff *skb));
108+
void llc_set_station_handler(void (*handler)(struct sk_buff *skb));
109109

110-
extern struct llc_sap *llc_sap_open(unsigned char lsap,
111-
int (*rcv)(struct sk_buff *skb,
112-
struct net_device *dev,
113-
struct packet_type *pt,
114-
struct net_device *orig_dev));
110+
struct llc_sap *llc_sap_open(unsigned char lsap,
111+
int (*rcv)(struct sk_buff *skb,
112+
struct net_device *dev,
113+
struct packet_type *pt,
114+
struct net_device *orig_dev));
115115
static inline void llc_sap_hold(struct llc_sap *sap)
116116
{
117117
atomic_inc(&sap->refcnt);
118118
}
119119

120-
extern void llc_sap_close(struct llc_sap *sap);
120+
void llc_sap_close(struct llc_sap *sap);
121121

122122
static inline void llc_sap_put(struct llc_sap *sap)
123123
{
124124
if (atomic_dec_and_test(&sap->refcnt))
125125
llc_sap_close(sap);
126126
}
127127

128-
extern struct llc_sap *llc_sap_find(unsigned char sap_value);
128+
struct llc_sap *llc_sap_find(unsigned char sap_value);
129129

130-
extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb,
131-
unsigned char *dmac, unsigned char dsap);
130+
int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb,
131+
unsigned char *dmac, unsigned char dsap);
132132

133-
extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb);
134-
extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb);
133+
void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb);
134+
void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb);
135135

136-
extern void llc_station_init(void);
137-
extern void llc_station_exit(void);
136+
void llc_station_init(void);
137+
void llc_station_exit(void);
138138

139139
#ifdef CONFIG_PROC_FS
140-
extern int llc_proc_init(void);
141-
extern void llc_proc_exit(void);
140+
int llc_proc_init(void);
141+
void llc_proc_exit(void);
142142
#else
143143
#define llc_proc_init() (0)
144144
#define llc_proc_exit() do { } while(0)
145145
#endif /* CONFIG_PROC_FS */
146146
#ifdef CONFIG_SYSCTL
147-
extern int llc_sysctl_init(void);
148-
extern void llc_sysctl_exit(void);
147+
int llc_sysctl_init(void);
148+
void llc_sysctl_exit(void);
149149

150150
extern int sysctl_llc2_ack_timeout;
151151
extern int sysctl_llc2_busy_timeout;

‎include/net/llc_c_ac.h‎

Lines changed: 84 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -89,114 +89,92 @@
8989

9090
typedef int (*llc_conn_action_t)(struct sock *sk, struct sk_buff *skb);
9191

92-
extern int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb);
93-
extern int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb);
94-
extern int llc_conn_ac_conn_confirm(struct sock* sk, struct sk_buff *skb);
95-
extern int llc_conn_ac_data_ind(struct sock* sk, struct sk_buff *skb);
96-
extern int llc_conn_ac_disc_ind(struct sock* sk, struct sk_buff *skb);
97-
extern int llc_conn_ac_rst_ind(struct sock* sk, struct sk_buff *skb);
98-
extern int llc_conn_ac_rst_confirm(struct sock* sk, struct sk_buff *skb);
99-
extern int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock* sk,
100-
struct sk_buff *skb);
101-
extern int llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2(struct sock* sk,
102-
struct sk_buff *skb);
103-
extern int llc_conn_ac_send_disc_cmd_p_set_x(struct sock* sk,
104-
struct sk_buff *skb);
105-
extern int llc_conn_ac_send_dm_rsp_f_set_p(struct sock* sk,
106-
struct sk_buff *skb);
107-
extern int llc_conn_ac_send_dm_rsp_f_set_1(struct sock* sk,
108-
struct sk_buff *skb);
109-
extern int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock* sk,
110-
struct sk_buff *skb);
111-
extern int llc_conn_ac_resend_frmr_rsp_f_set_0(struct sock* sk,
112-
struct sk_buff *skb);
113-
extern int llc_conn_ac_resend_frmr_rsp_f_set_p(struct sock* sk,
114-
struct sk_buff *skb);
115-
extern int llc_conn_ac_send_i_cmd_p_set_1(struct sock* sk, struct sk_buff *skb);
116-
extern int llc_conn_ac_send_i_xxx_x_set_0(struct sock* sk, struct sk_buff *skb);
117-
extern int llc_conn_ac_resend_i_xxx_x_set_0(struct sock* sk,
118-
struct sk_buff *skb);
119-
extern int llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr(struct sock* sk,
120-
struct sk_buff *skb);
121-
extern int llc_conn_ac_resend_i_rsp_f_set_1(struct sock* sk,
122-
struct sk_buff *skb);
123-
extern int llc_conn_ac_send_rej_cmd_p_set_1(struct sock* sk,
124-
struct sk_buff *skb);
125-
extern int llc_conn_ac_send_rej_rsp_f_set_1(struct sock* sk,
126-
struct sk_buff *skb);
127-
extern int llc_conn_ac_send_rej_xxx_x_set_0(struct sock* sk,
92+
int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb);
93+
int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb);
94+
int llc_conn_ac_conn_confirm(struct sock *sk, struct sk_buff *skb);
95+
int llc_conn_ac_data_ind(struct sock *sk, struct sk_buff *skb);
96+
int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb);
97+
int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb);
98+
int llc_conn_ac_rst_confirm(struct sock *sk, struct sk_buff *skb);
99+
int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock *sk,
128100
struct sk_buff *skb);
129-
extern int llc_conn_ac_send_rnr_cmd_p_set_1(struct sock* sk,
130-
struct sk_buff *skb);
131-
extern int llc_conn_ac_send_rnr_rsp_f_set_1(struct sock* sk,
132-
struct sk_buff *skb);
133-
extern int llc_conn_ac_send_rnr_xxx_x_set_0(struct sock* sk,
134-
struct sk_buff *skb);
135-
extern int llc_conn_ac_set_remote_busy(struct sock* sk, struct sk_buff *skb);
136-
extern int llc_conn_ac_opt_send_rnr_xxx_x_set_0(struct sock* sk,
101+
int llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2(struct sock *sk,
102+
struct sk_buff *skb);
103+
int llc_conn_ac_send_disc_cmd_p_set_x(struct sock *sk, struct sk_buff *skb);
104+
int llc_conn_ac_send_dm_rsp_f_set_p(struct sock *sk, struct sk_buff *skb);
105+
int llc_conn_ac_send_dm_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
106+
int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock *sk, struct sk_buff *skb);
107+
int llc_conn_ac_resend_frmr_rsp_f_set_0(struct sock *sk, struct sk_buff *skb);
108+
int llc_conn_ac_resend_frmr_rsp_f_set_p(struct sock *sk, struct sk_buff *skb);
109+
int llc_conn_ac_send_i_cmd_p_set_1(struct sock *sk, struct sk_buff *skb);
110+
int llc_conn_ac_send_i_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
111+
int llc_conn_ac_resend_i_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
112+
int llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr(struct sock *sk,
137113
struct sk_buff *skb);
138-
extern int llc_conn_ac_send_rr_cmd_p_set_1(struct sock* sk,
139-
struct sk_buff *skb);
140-
extern int llc_conn_ac_send_rr_rsp_f_set_1(struct sock* sk,
141-
struct sk_buff *skb);
142-
extern int llc_conn_ac_send_ack_rsp_f_set_1(struct sock* sk,
143-
struct sk_buff *skb);
144-
extern int llc_conn_ac_send_rr_xxx_x_set_0(struct sock* sk,
145-
struct sk_buff *skb);
146-
extern int llc_conn_ac_send_ack_xxx_x_set_0(struct sock* sk,
147-
struct sk_buff *skb);
148-
extern int llc_conn_ac_send_sabme_cmd_p_set_x(struct sock* sk,
149-
struct sk_buff *skb);
150-
extern int llc_conn_ac_send_ua_rsp_f_set_p(struct sock* sk,
151-
struct sk_buff *skb);
152-
extern int llc_conn_ac_set_s_flag_0(struct sock* sk, struct sk_buff *skb);
153-
extern int llc_conn_ac_set_s_flag_1(struct sock* sk, struct sk_buff *skb);
154-
extern int llc_conn_ac_start_p_timer(struct sock* sk, struct sk_buff *skb);
155-
extern int llc_conn_ac_start_ack_timer(struct sock* sk, struct sk_buff *skb);
156-
extern int llc_conn_ac_start_rej_timer(struct sock* sk, struct sk_buff *skb);
157-
extern int llc_conn_ac_start_ack_tmr_if_not_running(struct sock* sk,
158-
struct sk_buff *skb);
159-
extern int llc_conn_ac_stop_ack_timer(struct sock* sk, struct sk_buff *skb);
160-
extern int llc_conn_ac_stop_p_timer(struct sock* sk, struct sk_buff *skb);
161-
extern int llc_conn_ac_stop_rej_timer(struct sock* sk, struct sk_buff *skb);
162-
extern int llc_conn_ac_stop_all_timers(struct sock* sk, struct sk_buff *skb);
163-
extern int llc_conn_ac_stop_other_timers(struct sock* sk, struct sk_buff *skb);
164-
extern int llc_conn_ac_upd_nr_received(struct sock* sk, struct sk_buff *skb);
165-
extern int llc_conn_ac_inc_tx_win_size(struct sock* sk, struct sk_buff *skb);
166-
extern int llc_conn_ac_dec_tx_win_size(struct sock* sk, struct sk_buff *skb);
167-
extern int llc_conn_ac_upd_p_flag(struct sock* sk, struct sk_buff *skb);
168-
extern int llc_conn_ac_set_data_flag_2(struct sock* sk, struct sk_buff *skb);
169-
extern int llc_conn_ac_set_data_flag_0(struct sock* sk, struct sk_buff *skb);
170-
extern int llc_conn_ac_set_data_flag_1(struct sock* sk, struct sk_buff *skb);
171-
extern int llc_conn_ac_set_data_flag_1_if_data_flag_eq_0(struct sock* sk,
172-
struct sk_buff *skb);
173-
extern int llc_conn_ac_set_p_flag_0(struct sock* sk, struct sk_buff *skb);
174-
extern int llc_conn_ac_set_remote_busy_0(struct sock* sk, struct sk_buff *skb);
175-
extern int llc_conn_ac_set_retry_cnt_0(struct sock* sk, struct sk_buff *skb);
176-
extern int llc_conn_ac_set_cause_flag_0(struct sock* sk, struct sk_buff *skb);
177-
extern int llc_conn_ac_set_cause_flag_1(struct sock* sk, struct sk_buff *skb);
178-
extern int llc_conn_ac_inc_retry_cnt_by_1(struct sock* sk, struct sk_buff *skb);
179-
extern int llc_conn_ac_set_vr_0(struct sock* sk, struct sk_buff *skb);
180-
extern int llc_conn_ac_inc_vr_by_1(struct sock* sk, struct sk_buff *skb);
181-
extern int llc_conn_ac_set_vs_0(struct sock* sk, struct sk_buff *skb);
182-
extern int llc_conn_ac_set_vs_nr(struct sock* sk, struct sk_buff *skb);
183-
extern int llc_conn_ac_rst_vs(struct sock* sk, struct sk_buff *skb);
184-
extern int llc_conn_ac_upd_vs(struct sock* sk, struct sk_buff *skb);
185-
extern int llc_conn_disc(struct sock* sk, struct sk_buff *skb);
186-
extern int llc_conn_reset(struct sock* sk, struct sk_buff *skb);
187-
extern int llc_conn_ac_disc_confirm(struct sock* sk, struct sk_buff *skb);
188-
extern u8 llc_circular_between(u8 a, u8 b, u8 c);
189-
extern int llc_conn_ac_send_ack_if_needed(struct sock* sk, struct sk_buff *skb);
190-
extern int llc_conn_ac_adjust_npta_by_rr(struct sock* sk, struct sk_buff *skb);
191-
extern int llc_conn_ac_adjust_npta_by_rnr(struct sock* sk, struct sk_buff *skb);
192-
extern int llc_conn_ac_rst_sendack_flag(struct sock* sk, struct sk_buff *skb);
193-
extern int llc_conn_ac_send_i_rsp_as_ack(struct sock* sk, struct sk_buff *skb);
194-
extern int llc_conn_ac_send_i_as_ack(struct sock* sk, struct sk_buff *skb);
114+
int llc_conn_ac_resend_i_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
115+
int llc_conn_ac_send_rej_cmd_p_set_1(struct sock *sk, struct sk_buff *skb);
116+
int llc_conn_ac_send_rej_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
117+
int llc_conn_ac_send_rej_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
118+
int llc_conn_ac_send_rnr_cmd_p_set_1(struct sock *sk, struct sk_buff *skb);
119+
int llc_conn_ac_send_rnr_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
120+
int llc_conn_ac_send_rnr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
121+
int llc_conn_ac_set_remote_busy(struct sock *sk, struct sk_buff *skb);
122+
int llc_conn_ac_opt_send_rnr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
123+
int llc_conn_ac_send_rr_cmd_p_set_1(struct sock *sk, struct sk_buff *skb);
124+
int llc_conn_ac_send_rr_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
125+
int llc_conn_ac_send_ack_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
126+
int llc_conn_ac_send_rr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
127+
int llc_conn_ac_send_ack_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
128+
int llc_conn_ac_send_sabme_cmd_p_set_x(struct sock *sk, struct sk_buff *skb);
129+
int llc_conn_ac_send_ua_rsp_f_set_p(struct sock *sk, struct sk_buff *skb);
130+
int llc_conn_ac_set_s_flag_0(struct sock *sk, struct sk_buff *skb);
131+
int llc_conn_ac_set_s_flag_1(struct sock *sk, struct sk_buff *skb);
132+
int llc_conn_ac_start_p_timer(struct sock *sk, struct sk_buff *skb);
133+
int llc_conn_ac_start_ack_timer(struct sock *sk, struct sk_buff *skb);
134+
int llc_conn_ac_start_rej_timer(struct sock *sk, struct sk_buff *skb);
135+
int llc_conn_ac_start_ack_tmr_if_not_running(struct sock *sk,
136+
struct sk_buff *skb);
137+
int llc_conn_ac_stop_ack_timer(struct sock *sk, struct sk_buff *skb);
138+
int llc_conn_ac_stop_p_timer(struct sock *sk, struct sk_buff *skb);
139+
int llc_conn_ac_stop_rej_timer(struct sock *sk, struct sk_buff *skb);
140+
int llc_conn_ac_stop_all_timers(struct sock *sk, struct sk_buff *skb);
141+
int llc_conn_ac_stop_other_timers(struct sock *sk, struct sk_buff *skb);
142+
int llc_conn_ac_upd_nr_received(struct sock *sk, struct sk_buff *skb);
143+
int llc_conn_ac_inc_tx_win_size(struct sock *sk, struct sk_buff *skb);
144+
int llc_conn_ac_dec_tx_win_size(struct sock *sk, struct sk_buff *skb);
145+
int llc_conn_ac_upd_p_flag(struct sock *sk, struct sk_buff *skb);
146+
int llc_conn_ac_set_data_flag_2(struct sock *sk, struct sk_buff *skb);
147+
int llc_conn_ac_set_data_flag_0(struct sock *sk, struct sk_buff *skb);
148+
int llc_conn_ac_set_data_flag_1(struct sock *sk, struct sk_buff *skb);
149+
int llc_conn_ac_set_data_flag_1_if_data_flag_eq_0(struct sock *sk,
150+
struct sk_buff *skb);
151+
int llc_conn_ac_set_p_flag_0(struct sock *sk, struct sk_buff *skb);
152+
int llc_conn_ac_set_remote_busy_0(struct sock *sk, struct sk_buff *skb);
153+
int llc_conn_ac_set_retry_cnt_0(struct sock *sk, struct sk_buff *skb);
154+
int llc_conn_ac_set_cause_flag_0(struct sock *sk, struct sk_buff *skb);
155+
int llc_conn_ac_set_cause_flag_1(struct sock *sk, struct sk_buff *skb);
156+
int llc_conn_ac_inc_retry_cnt_by_1(struct sock *sk, struct sk_buff *skb);
157+
int llc_conn_ac_set_vr_0(struct sock *sk, struct sk_buff *skb);
158+
int llc_conn_ac_inc_vr_by_1(struct sock *sk, struct sk_buff *skb);
159+
int llc_conn_ac_set_vs_0(struct sock *sk, struct sk_buff *skb);
160+
int llc_conn_ac_set_vs_nr(struct sock *sk, struct sk_buff *skb);
161+
int llc_conn_ac_rst_vs(struct sock *sk, struct sk_buff *skb);
162+
int llc_conn_ac_upd_vs(struct sock *sk, struct sk_buff *skb);
163+
int llc_conn_disc(struct sock *sk, struct sk_buff *skb);
164+
int llc_conn_reset(struct sock *sk, struct sk_buff *skb);
165+
int llc_conn_ac_disc_confirm(struct sock *sk, struct sk_buff *skb);
166+
u8 llc_circular_between(u8 a, u8 b, u8 c);
167+
int llc_conn_ac_send_ack_if_needed(struct sock *sk, struct sk_buff *skb);
168+
int llc_conn_ac_adjust_npta_by_rr(struct sock *sk, struct sk_buff *skb);
169+
int llc_conn_ac_adjust_npta_by_rnr(struct sock *sk, struct sk_buff *skb);
170+
int llc_conn_ac_rst_sendack_flag(struct sock *sk, struct sk_buff *skb);
171+
int llc_conn_ac_send_i_rsp_as_ack(struct sock *sk, struct sk_buff *skb);
172+
int llc_conn_ac_send_i_as_ack(struct sock *sk, struct sk_buff *skb);
195173

196-
extern void llc_conn_busy_tmr_cb(unsigned long timeout_data);
197-
extern void llc_conn_pf_cycle_tmr_cb(unsigned long timeout_data);
198-
extern void llc_conn_ack_tmr_cb(unsigned long timeout_data);
199-
extern void llc_conn_rej_tmr_cb(unsigned long timeout_data);
174+
void llc_conn_busy_tmr_cb(unsigned long timeout_data);
175+
void llc_conn_pf_cycle_tmr_cb(unsigned long timeout_data);
176+
void llc_conn_ack_tmr_cb(unsigned long timeout_data);
177+
void llc_conn_rej_tmr_cb(unsigned long timeout_data);
200178

201-
extern void llc_conn_set_p_flag(struct sock *sk, u8 value);
179+
void llc_conn_set_p_flag(struct sock *sk, u8 value);
202180
#endif /* LLC_C_AC_H */

0 commit comments

Comments
 (0)