Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf3c710f authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cb7d3d71
Loading
Loading
Loading
Loading
+25 −25
Original line number Diff line number Diff line
@@ -95,19 +95,19 @@ struct hlist_nulls_head *llc_sk_laddr_hash(struct llc_sap *sap,
extern struct list_head llc_sap_list;
extern spinlock_t llc_sap_list_lock;

extern int llc_rcv(struct sk_buff *skb, struct net_device *dev,
		   struct packet_type *pt, struct net_device *orig_dev);
int llc_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
	    struct net_device *orig_dev);

extern int llc_mac_hdr_init(struct sk_buff *skb,
			    const unsigned char *sa, const unsigned char *da);
int llc_mac_hdr_init(struct sk_buff *skb, const unsigned char *sa,
		     const unsigned char *da);

extern void llc_add_pack(int type, void (*handler)(struct llc_sap *sap,
						   struct sk_buff *skb));
extern void llc_remove_pack(int type);
void llc_add_pack(int type,
		  void (*handler)(struct llc_sap *sap, struct sk_buff *skb));
void llc_remove_pack(int type);

extern void llc_set_station_handler(void (*handler)(struct sk_buff *skb));
void llc_set_station_handler(void (*handler)(struct sk_buff *skb));

extern struct llc_sap *llc_sap_open(unsigned char lsap,
struct llc_sap *llc_sap_open(unsigned char lsap,
			     int (*rcv)(struct sk_buff *skb,
					struct net_device *dev,
					struct packet_type *pt,
@@ -117,7 +117,7 @@ static inline void llc_sap_hold(struct llc_sap *sap)
	atomic_inc(&sap->refcnt);
}

extern void llc_sap_close(struct llc_sap *sap);
void llc_sap_close(struct llc_sap *sap);

static inline void llc_sap_put(struct llc_sap *sap)
{
@@ -125,27 +125,27 @@ static inline void llc_sap_put(struct llc_sap *sap)
		llc_sap_close(sap);
}

extern struct llc_sap *llc_sap_find(unsigned char sap_value);
struct llc_sap *llc_sap_find(unsigned char sap_value);

extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb,
int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb,
			      unsigned char *dmac, unsigned char dsap);

extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb);
extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb);
void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb);
void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb);

extern void llc_station_init(void);
extern void llc_station_exit(void);
void llc_station_init(void);
void llc_station_exit(void);

#ifdef CONFIG_PROC_FS
extern int llc_proc_init(void);
extern void llc_proc_exit(void);
int llc_proc_init(void);
void llc_proc_exit(void);
#else
#define llc_proc_init()	(0)
#define llc_proc_exit()	do { } while(0)
#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_SYSCTL
extern int llc_sysctl_init(void);
extern void llc_sysctl_exit(void);
int llc_sysctl_init(void);
void llc_sysctl_exit(void);

extern int sysctl_llc2_ack_timeout;
extern int sysctl_llc2_busy_timeout;
+84 −106
Original line number Diff line number Diff line
@@ -89,114 +89,92 @@

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

extern int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb);
extern int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb);
extern int llc_conn_ac_conn_confirm(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_data_ind(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_disc_ind(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_rst_ind(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_rst_confirm(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock* sk,
						   struct sk_buff *skb);
extern int llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2(struct sock* sk,
						      struct sk_buff *skb);
extern int llc_conn_ac_send_disc_cmd_p_set_x(struct sock* sk,
					     struct sk_buff *skb);
extern int llc_conn_ac_send_dm_rsp_f_set_p(struct sock* sk,
					   struct sk_buff *skb);
extern int llc_conn_ac_send_dm_rsp_f_set_1(struct sock* sk,
					   struct sk_buff *skb);
extern int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock* sk,
					     struct sk_buff *skb);
extern int llc_conn_ac_resend_frmr_rsp_f_set_0(struct sock* sk,
					       struct sk_buff *skb);
extern int llc_conn_ac_resend_frmr_rsp_f_set_p(struct sock* sk,
					       struct sk_buff *skb);
extern int llc_conn_ac_send_i_cmd_p_set_1(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_send_i_xxx_x_set_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_resend_i_xxx_x_set_0(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr(struct sock* sk,
						       struct sk_buff *skb);
extern int llc_conn_ac_resend_i_rsp_f_set_1(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_send_rej_cmd_p_set_1(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_send_rej_rsp_f_set_1(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_send_rej_xxx_x_set_0(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_send_rnr_cmd_p_set_1(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_send_rnr_rsp_f_set_1(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_send_rnr_xxx_x_set_0(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_set_remote_busy(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_opt_send_rnr_xxx_x_set_0(struct sock* sk,
						struct sk_buff *skb);
extern int llc_conn_ac_send_rr_cmd_p_set_1(struct sock* sk,
					   struct sk_buff *skb);
extern int llc_conn_ac_send_rr_rsp_f_set_1(struct sock* sk,
					   struct sk_buff *skb);
extern int llc_conn_ac_send_ack_rsp_f_set_1(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_send_rr_xxx_x_set_0(struct sock* sk,
					   struct sk_buff *skb);
extern int llc_conn_ac_send_ack_xxx_x_set_0(struct sock* sk,
					    struct sk_buff *skb);
extern int llc_conn_ac_send_sabme_cmd_p_set_x(struct sock* sk,
					      struct sk_buff *skb);
extern int llc_conn_ac_send_ua_rsp_f_set_p(struct sock* sk,
					   struct sk_buff *skb);
extern int llc_conn_ac_set_s_flag_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_s_flag_1(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_start_p_timer(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_start_ack_timer(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_start_rej_timer(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_start_ack_tmr_if_not_running(struct sock* sk,
						    struct sk_buff *skb);
extern int llc_conn_ac_stop_ack_timer(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_stop_p_timer(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_stop_rej_timer(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_stop_all_timers(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_stop_other_timers(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_upd_nr_received(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_inc_tx_win_size(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_dec_tx_win_size(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_upd_p_flag(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_data_flag_2(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_data_flag_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_data_flag_1(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_data_flag_1_if_data_flag_eq_0(struct sock* sk,
							 struct sk_buff *skb);
extern int llc_conn_ac_set_p_flag_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_remote_busy_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_retry_cnt_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_cause_flag_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_cause_flag_1(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_inc_retry_cnt_by_1(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_vr_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_inc_vr_by_1(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_vs_0(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_set_vs_nr(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_rst_vs(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_upd_vs(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_disc(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_reset(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_disc_confirm(struct sock* sk, struct sk_buff *skb);
extern u8 llc_circular_between(u8 a, u8 b, u8 c);
extern int llc_conn_ac_send_ack_if_needed(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_adjust_npta_by_rr(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_adjust_npta_by_rnr(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_rst_sendack_flag(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_send_i_rsp_as_ack(struct sock* sk, struct sk_buff *skb);
extern int llc_conn_ac_send_i_as_ack(struct sock* sk, struct sk_buff *skb);
int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_conn_confirm(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_data_ind(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_rst_confirm(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock *sk,
					    struct sk_buff *skb);
int llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2(struct sock *sk,
					       struct sk_buff *skb);
int llc_conn_ac_send_disc_cmd_p_set_x(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_dm_rsp_f_set_p(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_dm_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_resend_frmr_rsp_f_set_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_resend_frmr_rsp_f_set_p(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_i_cmd_p_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_i_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_resend_i_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr(struct sock *sk,
						struct sk_buff *skb);
int llc_conn_ac_resend_i_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rej_cmd_p_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rej_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rej_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rnr_cmd_p_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rnr_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rnr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_remote_busy(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_opt_send_rnr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rr_cmd_p_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rr_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_ack_rsp_f_set_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_rr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_ack_xxx_x_set_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_sabme_cmd_p_set_x(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_ua_rsp_f_set_p(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_s_flag_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_s_flag_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_start_p_timer(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_start_ack_timer(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_start_rej_timer(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_start_ack_tmr_if_not_running(struct sock *sk,
					     struct sk_buff *skb);
int llc_conn_ac_stop_ack_timer(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_stop_p_timer(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_stop_rej_timer(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_stop_all_timers(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_stop_other_timers(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_upd_nr_received(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_inc_tx_win_size(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_dec_tx_win_size(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_upd_p_flag(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_data_flag_2(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_data_flag_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_data_flag_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_data_flag_1_if_data_flag_eq_0(struct sock *sk,
						  struct sk_buff *skb);
int llc_conn_ac_set_p_flag_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_remote_busy_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_retry_cnt_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_cause_flag_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_cause_flag_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_inc_retry_cnt_by_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_vr_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_inc_vr_by_1(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_vs_0(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_set_vs_nr(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_rst_vs(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_upd_vs(struct sock *sk, struct sk_buff *skb);
int llc_conn_disc(struct sock *sk, struct sk_buff *skb);
int llc_conn_reset(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_disc_confirm(struct sock *sk, struct sk_buff *skb);
u8 llc_circular_between(u8 a, u8 b, u8 c);
int llc_conn_ac_send_ack_if_needed(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_adjust_npta_by_rr(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_adjust_npta_by_rnr(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_rst_sendack_flag(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_i_rsp_as_ack(struct sock *sk, struct sk_buff *skb);
int llc_conn_ac_send_i_as_ack(struct sock *sk, struct sk_buff *skb);

extern void llc_conn_busy_tmr_cb(unsigned long timeout_data);
extern void llc_conn_pf_cycle_tmr_cb(unsigned long timeout_data);
extern void llc_conn_ack_tmr_cb(unsigned long timeout_data);
extern void llc_conn_rej_tmr_cb(unsigned long timeout_data);
void llc_conn_busy_tmr_cb(unsigned long timeout_data);
void llc_conn_pf_cycle_tmr_cb(unsigned long timeout_data);
void llc_conn_ack_tmr_cb(unsigned long timeout_data);
void llc_conn_rej_tmr_cb(unsigned long timeout_data);

extern void llc_conn_set_p_flag(struct sock *sk, u8 value);
void llc_conn_set_p_flag(struct sock *sk, u8 value);
#endif /* LLC_C_AC_H */
+81 −126

File changed.

Preview size limit exceeded, changes collapsed.

+16 −20
Original line number Diff line number Diff line
@@ -95,28 +95,24 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb)
	return skb->cb[sizeof(skb->cb) - 1];
}

extern struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority,
struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority,
			  struct proto *prot);
extern void llc_sk_free(struct sock *sk);
void llc_sk_free(struct sock *sk);

extern void llc_sk_reset(struct sock *sk);
void llc_sk_reset(struct sock *sk);

/* Access to a connection */
extern int llc_conn_state_process(struct sock *sk, struct sk_buff *skb);
extern void llc_conn_send_pdu(struct sock *sk, struct sk_buff *skb);
extern void llc_conn_rtn_pdu(struct sock *sk, struct sk_buff *skb);
extern void llc_conn_resend_i_pdu_as_cmd(struct sock *sk, u8 nr,
					 u8 first_p_bit);
extern void llc_conn_resend_i_pdu_as_rsp(struct sock *sk, u8 nr,
					 u8 first_f_bit);
extern int llc_conn_remove_acked_pdus(struct sock *conn, u8 nr,
				      u16 *how_many_unacked);
extern struct sock *llc_lookup_established(struct llc_sap *sap,
					   struct llc_addr *daddr,
int llc_conn_state_process(struct sock *sk, struct sk_buff *skb);
void llc_conn_send_pdu(struct sock *sk, struct sk_buff *skb);
void llc_conn_rtn_pdu(struct sock *sk, struct sk_buff *skb);
void llc_conn_resend_i_pdu_as_cmd(struct sock *sk, u8 nr, u8 first_p_bit);
void llc_conn_resend_i_pdu_as_rsp(struct sock *sk, u8 nr, u8 first_f_bit);
int llc_conn_remove_acked_pdus(struct sock *conn, u8 nr, u16 *how_many_unacked);
struct sock *llc_lookup_established(struct llc_sap *sap, struct llc_addr *daddr,
				    struct llc_addr *laddr);
extern void llc_sap_add_socket(struct llc_sap *sap, struct sock *sk);
extern void llc_sap_remove_socket(struct llc_sap *sap, struct sock *sk);
void llc_sap_add_socket(struct llc_sap *sap, struct sock *sk);
void llc_sap_remove_socket(struct llc_sap *sap, struct sock *sk);

extern u8 llc_data_accept_state(u8 state);
extern void llc_build_offset_table(void);
u8 llc_data_accept_state(u8 state);
void llc_build_offset_table(void);
#endif /* LLC_CONN_H */
+3 −4
Original line number Diff line number Diff line
@@ -62,8 +62,7 @@
#define LLC_STATUS_CONFLICT	7 /* disconnect conn */
#define LLC_STATUS_RESET_DONE	8 /*  */

extern int llc_establish_connection(struct sock *sk, u8 *lmac,
				    u8 *dmac, u8 dsap);
extern int llc_build_and_send_pkt(struct sock *sk, struct sk_buff *skb);
extern int llc_send_disc(struct sock *sk);
int llc_establish_connection(struct sock *sk, u8 *lmac, u8 *dmac, u8 dsap);
int llc_build_and_send_pkt(struct sock *sk, struct sk_buff *skb);
int llc_send_disc(struct sock *sk);
#endif /* LLC_IF_H */
Loading