Skip to content

Commit

Permalink
[PATCH] drivers/net/arcnet/: possible cleanups
Browse files Browse the repository at this point in the history
This patch contains the following possible cleanups:
- make needlessly global code static
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arc_proto_null)
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arcnet_dump_packet)

To make Jeff happy, arcnet.c still prints
  arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
AdrianBunk authored and jgarzik committed Jan 17, 2006
1 parent ff5688a commit f03aa2d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion drivers/net/arcnet/arc-rawmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static int build_header(struct sk_buff *skb, struct net_device *dev,
static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
int bufnum);

struct ArcProto rawmode_proto =
static struct ArcProto rawmode_proto =
{
.suffix = 'r',
.mtu = XMTU,
Expand Down
17 changes: 10 additions & 7 deletions drivers/net/arcnet/arcnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ static int null_build_header(struct sk_buff *skb, struct net_device *dev,
static int null_prepare_tx(struct net_device *dev, struct archdr *pkt,
int length, int bufnum);

static void arcnet_rx(struct net_device *dev, int bufnum);

/*
* one ArcProto per possible proto ID. None of the elements of
Expand All @@ -72,7 +73,7 @@ static int null_prepare_tx(struct net_device *dev, struct archdr *pkt,
struct ArcProto *arc_proto_map[256], *arc_proto_default,
*arc_bcast_proto, *arc_raw_proto;

struct ArcProto arc_proto_null =
static struct ArcProto arc_proto_null =
{
.suffix = '?',
.mtu = XMTU,
Expand All @@ -91,7 +92,6 @@ EXPORT_SYMBOL(arc_proto_map);
EXPORT_SYMBOL(arc_proto_default);
EXPORT_SYMBOL(arc_bcast_proto);
EXPORT_SYMBOL(arc_raw_proto);
EXPORT_SYMBOL(arc_proto_null);
EXPORT_SYMBOL(arcnet_unregister_proto);
EXPORT_SYMBOL(arcnet_debug);
EXPORT_SYMBOL(alloc_arcdev);
Expand Down Expand Up @@ -119,7 +119,7 @@ static int __init arcnet_init(void)

arcnet_debug = debug;

printk(VERSION);
printk("arcnet loaded.\n");

#ifdef ALPHA_WARNING
BUGLVL(D_EXTRA) {
Expand Down Expand Up @@ -179,8 +179,8 @@ EXPORT_SYMBOL(arcnet_dump_skb);
* Dump the contents of an ARCnet buffer
*/
#if (ARCNET_DEBUG_MAX & (D_RX | D_TX))
void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
int take_arcnet_lock)
static void arcnet_dump_packet(struct net_device *dev, int bufnum,
char *desc, int take_arcnet_lock)
{
struct arcnet_local *lp = dev->priv;
int i, length;
Expand Down Expand Up @@ -209,7 +209,10 @@ void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,

}

EXPORT_SYMBOL(arcnet_dump_packet);
#else

#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) do { } while (0)

#endif


Expand Down Expand Up @@ -997,7 +1000,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs)
* This is a generic packet receiver that calls arcnet??_rx depending on the
* protocol ID found.
*/
void arcnet_rx(struct net_device *dev, int bufnum)
static void arcnet_rx(struct net_device *dev, int bufnum)
{
struct arcnet_local *lp = dev->priv;
struct archdr pkt;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/arcnet/rfc1051.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
int bufnum);


struct ArcProto rfc1051_proto =
static struct ArcProto rfc1051_proto =
{
.suffix = 's',
.mtu = XMTU - RFC1051_HDR_SIZE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/arcnet/rfc1201.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
int bufnum);
static int continue_tx(struct net_device *dev, int bufnum);

struct ArcProto rfc1201_proto =
static struct ArcProto rfc1201_proto =
{
.suffix = 'a',
.mtu = 1500, /* could be more, but some receivers can't handle it... */
Expand Down
9 changes: 0 additions & 9 deletions include/linux/arcdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ struct ArcProto {

extern struct ArcProto *arc_proto_map[256], *arc_proto_default,
*arc_bcast_proto, *arc_raw_proto;
extern struct ArcProto arc_proto_null;


/*
Expand Down Expand Up @@ -334,17 +333,9 @@ void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc);
#define arcnet_dump_skb(dev,skb,desc) ;
#endif

#if (ARCNET_DEBUG_MAX & D_RX) || (ARCNET_DEBUG_MAX & D_TX)
void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
int take_arcnet_lock);
#else
#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) ;
#endif

void arcnet_unregister_proto(struct ArcProto *proto);
irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs);
struct net_device *alloc_arcdev(char *name);
void arcnet_rx(struct net_device *dev, int bufnum);

#endif /* __KERNEL__ */
#endif /* _LINUX_ARCDEVICE_H */

0 comments on commit f03aa2d

Please sign in to comment.