net/atm/: possible cleanups
Subsystems (4)
PATCH 1/1 net/atm/: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- lec.c: remove the unused global function get_dev_lec
Signed-off-by Adrian Bunk <[email protected]>
---
net/atm/common.c | 2 - net/atm/lec.c | 83 +++++++++++++++++++++++--------------------- net/atm/lec.h | 9 ---- net/atm/lec_arpc.h | 24 ------------ net/atm/mpc.c | 6 +-- net/atm/mpc.h | 4 -- net/atm/pppoatm.c | 2 - net/atm/protocols.h | 2 - net/atm/raw.c | 2 - 9 files changed, 51 insertions(+), 83 deletions(-)
net/atm/common.c renamed from net/atm/common.c.old +1 -1
@@ -41,7 +41,7 @@struct hlist_head vcc_hash[VCC_HTABLE_SIZE ];DEFINE_RWLOCK (vcc_sklist_lock); -void __vcc_insert_socket (struct sock *sk) +static void __vcc_insert_socket (struct sock *sk) {struct atm_vcc *vcc =atm_sk (sk); struct hlist_head *head = &vcc_hash[vcc->vci &
net/atm/lec.h renamed from net/atm/lec.h.old +0 -9
@@ -146,14 +146,5 @@#define LEC_VCC_PRIV (vcc) ((struct lec_vcc_priv *)((vcc)->user_back)) -int lecd_attach (struct atm_vcc *vcc,int arg); -int lec_vcc_attach (struct atm_vcc *vcc,void __user *arg); -int lec_mcast_attach (struct atm_vcc *vcc,int arg); -struct net_device *get_dev_lec (int itf); -int send_to_lecd (struct lec_priv *priv, -atmlec_msg_type type,unsigned char *mac_addr, -unsigned char *atm_addr,struct sk_buff *data); -void lec_push (struct atm_vcc *vcc,struct sk_buff *skb); -#endif /* _LEC_H_ */
net/atm/lec_arpc.h renamed from net/atm/lec_arpc.h.old +0 -24
@@ -89,28 +89,4 @@#define LEC_REMOTE_FLAG 0x0001#define LEC_PERMANENT_FLAG 0x0002 -/* Protos */ -void lec_arp_init (struct lec_priv *priv); -int lec_mcast_make (struct lec_priv *priv,struct atm_vcc *vcc); -void lec_arp_destroy (struct lec_priv *priv); -void lec_vcc_close (struct lec_priv *priv,struct atm_vcc *vcc); - -struct atm_vcc *lec_arp_resolve (struct lec_priv *priv, -unsigned char *mac_to_addr, -int is_rdesc, -struct lec_arp_table **ret_entry); -void lec_vcc_added (struct lec_priv *dev, -struct atmlec_ioc *ioc_data,struct atm_vcc *vcc, -void (*old_push)(struct atm_vcc *vcc,struct sk_buff *skb)); -void lec_arp_check_empties (struct lec_priv *priv, -struct atm_vcc *vcc,struct sk_buff *skb); -int lec_addr_delete (struct lec_priv *priv, -unsigned char *mac_addr,unsigned long permanent); -void lec_flush_complete (struct lec_priv *priv,unsigned long tran_id); -void lec_arp_update (struct lec_priv *priv, -unsigned char *mac_addr,unsigned char *atm_addr, -unsigned long remoteflag,unsigned int targetless_le_arp); -void lec_set_flush_tran_id (struct lec_priv *priv, -unsigned char *mac_addr,unsigned long tran_id); -#endif
net/atm/lec.c renamed from net/atm/lec.c.old +45 -38
221 lines not on this page · raw message
net/atm/mpc.h renamed from net/atm/mpc.h.old +0 -4
@@ -11,10 +11,6 @@/* kernel -> mpc-daemon */ int msg_to_mpoad (struct k_message *msg,struct mpoa_client *mpc); -/* Functions for ioctl(ATMMPC_*) operations */ -int atm_mpoa_mpoad_attach (struct atm_vcc *vcc,int arg); -int atm_mpoa_vcc_attach (struct atm_vcc *vcc,void __user *arg); -struct mpoa_client {struct mpoa_client *next;struct net_device *dev;/* lec in question */
net/atm/mpc.c renamed from net/atm/mpc.c.old +3 -3
@@ -564,7 +564,7 @@return retval; } -int atm_mpoa_vcc_attach (struct atm_vcc *vcc,void __user *arg) +static int atm_mpoa_vcc_attach (struct atm_vcc *vcc,void __user *arg) {int bytes_left;struct mpoa_client *mpc;
@@ -753,7 +753,7 @@/* members not explicitly initialised will be 0 */ }; -int atm_mpoa_mpoad_attach (struct atm_vcc *vcc,int arg) +static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc,int arg) {struct mpoa_client *mpc;struct lec_priv *priv;
@@ -1460,7 +1460,7 @@return 0 ; } -void __exit atm_mpoa_cleanup(void) +static void __exit atm_mpoa_cleanup(void) {struct mpoa_client *mpc, *tmp;struct atm_mpoa_qos *qos, *nextqos;
net/atm/pppoatm.c renamed from net/atm/pppoatm.c.old +1 -1
@@ -345,7 +345,7 @@return -ENOIOCTLCMD ; } -struct atm_ioctl pppoatm_ioctl_ops = { +static struct atm_ioctl pppoatm_ioctl_ops = { .owner =THIS_MODULE , .ioctl = pppoatm_ioctl, };
net/atm/protocols.h renamed from net/atm/protocols.h.old +0 -2
@@ -6,8 +6,6 @@#ifndef NET_ATM_PROTOCOLS_H #define NET_ATM_PROTOCOLS_H -void atm_push_raw (struct atm_vcc *vcc,struct sk_buff *skb); -int atm_init_aal0 (struct atm_vcc *vcc);/* "raw" AAL0 */ int atm_init_aal34 (struct atm_vcc *vcc);/* "raw" AAL3/4 transport */ int atm_init_aal5 (struct atm_vcc *vcc);/* "raw" AAL5 transport */
net/atm/raw.c renamed from net/atm/raw.c.old +1 -1
@@ -25,7 +25,7 @@* SKB == NULL indicates that the link is being closed */ -void atm_push_raw (struct atm_vcc *vcc,struct sk_buff *skb) +static void atm_push_raw (struct atm_vcc *vcc,struct sk_buff *skb) {if (skb) {struct sock *sk =sk_atm (vcc);