drivers/net/arcnet/: possible cleanups
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 drivers/net/arcnet/: possible cleanups
Quoted 9 lines · Jeff Garzik
Quoted 5 lines · [email protected] wrote:
From: Adrian Bunk <[email protected]>
This patch contains the following possible cleanups:
- make needlessly global code static
-arcnet.c: remove the outdated VERSIONcontinually NAK'd, because it removes a version that may be relevant to somebody as a reference.
OK, what about the patch below that leaves the VERSION #define but doesn't print this 5 year old version string?
<-- snip -->
This patch contains the following possible cleanups:
- make needlessly global code static
- arcnet.c: don't print the outdated VERSION
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arc_proto_null)
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arcnet_dump_packet)
---
drivers/net/arcnet/arc-rawmode.c | 2 +- drivers/net/arcnet/arcnet.c | 17 ++++++++++------- drivers/net/arcnet/rfc1051.c | 2 +- drivers/net/arcnet/rfc1201.c | 2 +- include/linux/arcdevice.h | 9 --------- 5 files changed, 13 insertions(+), 19 deletions(-)
drivers/net/arcnet/arcnet.c renamed from drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups +10 -7
@@ -61,6 +59,7 @@ static int null_build_header(struct sk_bstatic 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
@@ -71,7 +70,7 @@ static int null_prepare_tx(struct net_destruct 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 ,
@@ -90,7 +89,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);
@@ -118,7 +116,7 @@ static int __init arcnet_init(void) arcnet_debug = debug; -printk (VERSION ); +printk ("arcnet loaded.\n" );#ifdef ALPHA_WARNING BUGLVL (D_EXTRA ) {
@@ -178,8 +176,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;
@@ -208,7 +206,10 @@ void arcnet_dump_packet(struct net_devic } -EXPORT_SYMBOL (arcnet_dump_packet); +#else + +#define arcnet_dump_packet (dev, bufnum, desc,take_arcnet_lock) do { } while (0) +#endif
@@ -987,7 +988,7 @@ irqreturn_t arcnet_interrupt(int irq, vo* 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;
drivers/net/arcnet/arc-rawmode.c renamed from drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups +1 -1
@@ -42,7 +42,7 @@ static int build_header(struct sk_buff *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 ,
drivers/net/arcnet/rfc1051.c renamed from drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups +1 -1
@@ -43,7 +43,7 @@ static int prepare_tx(struct net_device int bufnum); -struct ArcProto rfc1051_proto = +static struct ArcProto rfc1051_proto = { .suffix ='s' , .mtu =XMTU -RFC1051_HDR_SIZE ,
drivers/net/arcnet/rfc1201.c renamed from drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups +1 -1
@@ -43,7 +43,7 @@ static int prepare_tx(struct net_device 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... */
include/linux/arcdevice.h renamed from include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups +0 -9
@@ -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;/*
@@ -334,17 +333,9 @@ void arcnet_dump_skb(struct net_device *#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 */
_