Skip to content

Commit

Permalink
[NET] net/wanrouter/wanmain.c: cleanups
Browse files Browse the repository at this point in the history
This patch contains the following cleanups:
- make the following needlessly global functions static:
  - lock_adapter_irq()
  - unlock_adapter_irq()
- #if 0 the following unused global functions:
  - wanrouter_encapsulate()
  - wanrouter_type_trans()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Adrian Bunk authored and David S. Miller committed Feb 8, 2007
1 parent 84ff602 commit 97353cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
8 changes: 0 additions & 8 deletions include/linux/wanrouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,6 @@ struct wan_device {
/* Public functions available for device drivers */
extern int register_wan_device(struct wan_device *wandev);
extern int unregister_wan_device(char *name);
__be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev);
int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev,
unsigned short type);

/* Proc interface functions. These must not be called by the drivers! */
extern int wanrouter_proc_init(void);
Expand All @@ -527,11 +524,6 @@ extern int wanrouter_proc_add(struct wan_device *wandev);
extern int wanrouter_proc_delete(struct wan_device *wandev);
extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg);

extern void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
extern void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);



/* Public Data */
/* list of registered devices */
extern struct wan_device *wanrouter_router_devlist;
Expand Down
17 changes: 8 additions & 9 deletions net/wanrouter/wanmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ static int wanrouter_device_del_if(struct wan_device *wandev,

static struct wan_device *wanrouter_find_device(char *name);
static int wanrouter_delete_interface(struct wan_device *wandev, char *name);
void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
static void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
static void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);



Expand All @@ -104,8 +104,8 @@ struct wan_device* wanrouter_router_devlist; /* list of registered devices */
* Organize Unique Identifiers for encapsulation/decapsulation
*/

static unsigned char wanrouter_oui_ether[] = { 0x00, 0x00, 0x00 };
#if 0
static unsigned char wanrouter_oui_ether[] = { 0x00, 0x00, 0x00 };
static unsigned char wanrouter_oui_802_2[] = { 0x00, 0x80, 0xC2 };
#endif

Expand Down Expand Up @@ -246,6 +246,8 @@ int unregister_wan_device(char *name)
return 0;
}

#if 0

/*
* Encapsulate packet.
*
Expand Down Expand Up @@ -341,6 +343,7 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev)
return ethertype;
}

#endif /* 0 */

/*
* WAN device IOCTL.
Expand Down Expand Up @@ -799,23 +802,19 @@ static int wanrouter_delete_interface(struct wan_device *wandev, char *name)
return 0;
}

void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags)
static void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags)
{
spin_lock_irqsave(lock, *smp_flags);
}


void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags)
static void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags)
{
spin_unlock_irqrestore(lock, *smp_flags);
}

EXPORT_SYMBOL(register_wan_device);
EXPORT_SYMBOL(unregister_wan_device);
EXPORT_SYMBOL(wanrouter_encapsulate);
EXPORT_SYMBOL(wanrouter_type_trans);
EXPORT_SYMBOL(lock_adapter_irq);
EXPORT_SYMBOL(unlock_adapter_irq);

MODULE_LICENSE("GPL");

Expand Down

0 comments on commit 97353cb

Please sign in to comment.