* [2.6 patch] drivers/net/arcnet/: possible cleanups
@ 2005-04-15 0:48 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2005-04-15 0:48 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, linux-kernel
This patch contains the following possible cleanups:
- make needlessly global code static
- arcnet.c: remove the outdated VERSION
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arc_proto_null)
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arcnet_dump_packet)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 24 Mar 2005
drivers/net/arcnet/arc-rawmode.c | 2 +-
drivers/net/arcnet/arcnet.c | 19 ++++++++++---------
drivers/net/arcnet/rfc1051.c | 2 +-
drivers/net/arcnet/rfc1201.c | 3 +--
include/linux/arcdevice.h | 9 ---------
5 files changed, 13 insertions(+), 22 deletions(-)
--- linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/arc-rawmode.c.old 2005-02-16 15:16:38.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/arc-rawmode.c 2005-02-16 15:16:51.000000000 +0100
@@ -42,7 +42,7 @@
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,
--- linux-2.6.11-rc3-mm2-full/include/linux/arcdevice.h.old 2005-02-16 15:17:26.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/include/linux/arcdevice.h 2005-02-16 15:20:57.000000000 +0100
@@ -206,7 +206,6 @@
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 @@
#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 */
--- linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/arcnet.c.old 2005-02-16 15:17:47.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/arcnet.c 2005-02-16 15:21:20.000000000 +0100
@@ -41,8 +41,6 @@
* <jojo@repas.de>
*/
-#define VERSION "arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.\n"
-
#include <linux/module.h>
#include <linux/config.h>
#include <linux/types.h>
@@ -61,6 +59,7 @@
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
@@ -71,7 +70,7 @@
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,
@@ -90,7 +89,6 @@
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,8 +116,8 @@
arcnet_debug = debug;
- printk(VERSION);
+ printk("arcnet loaded.\n");
#ifdef ALPHA_WARNING
BUGLVL(D_EXTRA) {
printk("arcnet: ***\n"
@@ -178,8 +174,8 @@
* 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 +204,10 @@
}
-EXPORT_SYMBOL(arcnet_dump_packet);
+#else
+
+#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) do { } while (0)
+
#endif
@@ -987,7 +986,7 @@
* 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;
--- linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/rfc1051.c.old 2005-02-16 15:22:16.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/rfc1051.c 2005-02-16 15:22:23.000000000 +0100
@@ -43,7 +43,7 @@
int bufnum);
-struct ArcProto rfc1051_proto =
+static struct ArcProto rfc1051_proto =
{
.suffix = 's',
.mtu = XMTU - RFC1051_HDR_SIZE,
--- linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/rfc1201.c.old 2005-02-16 15:22:35.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/rfc1201.c 2005-02-16 15:22:46.000000000 +0100
@@ -43,7 +43,7 @@
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... */
^ permalink raw reply [flat|nested] 6+ messages in thread
* [2.6 patch] drivers/net/arcnet/: possible cleanups
@ 2005-05-02 1:47 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2005-05-02 1:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jeff Garzik, netdev, linux-kernel
This patch contains the following possible cleanups:
- make needlessly global code static
- arcnet.c: remove the outdated VERSION
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arc_proto_null)
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arcnet_dump_packet)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 15 Apr 2005
- 24 Mar 2005
drivers/net/arcnet/arc-rawmode.c | 2 +-
drivers/net/arcnet/arcnet.c | 19 ++++++++++---------
drivers/net/arcnet/rfc1051.c | 2 +-
drivers/net/arcnet/rfc1201.c | 3 +--
include/linux/arcdevice.h | 9 ---------
5 files changed, 13 insertions(+), 22 deletions(-)
--- linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/arc-rawmode.c.old 2005-02-16 15:16:38.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/arc-rawmode.c 2005-02-16 15:16:51.000000000 +0100
@@ -42,7 +42,7 @@
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,
--- linux-2.6.11-rc3-mm2-full/include/linux/arcdevice.h.old 2005-02-16 15:17:26.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/include/linux/arcdevice.h 2005-02-16 15:20:57.000000000 +0100
@@ -206,7 +206,6 @@
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 @@
#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 */
--- linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/arcnet.c.old 2005-02-16 15:17:47.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/arcnet.c 2005-02-16 15:21:20.000000000 +0100
@@ -41,8 +41,6 @@
* <jojo@repas.de>
*/
-#define VERSION "arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.\n"
-
#include <linux/module.h>
#include <linux/config.h>
#include <linux/types.h>
@@ -61,6 +59,7 @@
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
@@ -71,7 +70,7 @@
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,
@@ -90,7 +89,6 @@
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,8 +116,8 @@
arcnet_debug = debug;
- printk(VERSION);
+ printk("arcnet loaded.\n");
#ifdef ALPHA_WARNING
BUGLVL(D_EXTRA) {
printk("arcnet: ***\n"
@@ -178,8 +174,8 @@
* 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 +204,10 @@
}
-EXPORT_SYMBOL(arcnet_dump_packet);
+#else
+
+#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) do { } while (0)
+
#endif
@@ -987,7 +986,7 @@
* 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;
--- linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/rfc1051.c.old 2005-02-16 15:22:16.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/rfc1051.c 2005-02-16 15:22:23.000000000 +0100
@@ -43,7 +43,7 @@
int bufnum);
-struct ArcProto rfc1051_proto =
+static struct ArcProto rfc1051_proto =
{
.suffix = 's',
.mtu = XMTU - RFC1051_HDR_SIZE,
--- linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/rfc1201.c.old 2005-02-16 15:22:35.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/arcnet/rfc1201.c 2005-02-16 15:22:46.000000000 +0100
@@ -43,7 +43,7 @@
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... */
^ permalink raw reply [flat|nested] 6+ messages in thread
* [2.6 patch] drivers/net/arcnet/: possible cleanups
[not found] ` <43281950.7000004@pobox.com>
@ 2005-10-30 10:50 ` Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2005-10-30 10:50 UTC (permalink / raw)
To: Jeff Garzik; +Cc: akpm, linux-kernel, netdev
On Wed, Sep 14, 2005 at 08:36:32AM -0400, Jeff Garzik wrote:
> akpm@osdl.org wrote:
> >From: Adrian Bunk <bunk@stusta.de>
> >
> >This patch contains the following possible cleanups:
> >- make needlessly global code static
> >- arcnet.c: remove the outdated VERSION
>
> continually 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)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
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(-)
diff -puN drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/arcnet.c
--- devel/drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/arcnet.c 2005-07-09 01:24:43.000000000 -0700
@@ -61,6 +59,7 @@ static int null_build_header(struct sk_b
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
@@ -71,7 +70,7 @@ static int null_prepare_tx(struct net_de
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,
@@ -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;
diff -puN drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/arc-rawmode.c
--- devel/drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/arc-rawmode.c 2005-07-09 01:24:43.000000000 -0700
@@ -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,
diff -puN drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/rfc1051.c
--- devel/drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/rfc1051.c 2005-07-09 01:24:43.000000000 -0700
@@ -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,
diff -puN drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/rfc1201.c
--- devel/drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/rfc1201.c 2005-07-09 01:24:43.000000000 -0700
@@ -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... */
diff -puN include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups include/linux/arcdevice.h
--- devel/include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/include/linux/arcdevice.h 2005-07-09 01:24:43.000000000 -0700
@@ -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 */
_
^ permalink raw reply [flat|nested] 6+ messages in thread
* [2.6 patch] drivers/net/arcnet/: possible cleanups
@ 2005-12-11 18:05 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2005-12-11 18:05 UTC (permalink / raw)
To: Jeff Garzik; +Cc: akpm, linux-kernel, netdev
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)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
This patch was already sent on:
- 30 Oct 2005
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(-)
diff -puN drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/arcnet.c
--- devel/drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/arcnet.c 2005-07-09 01:24:43.000000000 -0700
@@ -61,6 +59,7 @@ static int null_build_header(struct sk_b
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
@@ -71,7 +70,7 @@ static int null_prepare_tx(struct net_de
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,
@@ -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;
diff -puN drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/arc-rawmode.c
--- devel/drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/arc-rawmode.c 2005-07-09 01:24:43.000000000 -0700
@@ -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,
diff -puN drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/rfc1051.c
--- devel/drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/rfc1051.c 2005-07-09 01:24:43.000000000 -0700
@@ -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,
diff -puN drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/rfc1201.c
--- devel/drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/rfc1201.c 2005-07-09 01:24:43.000000000 -0700
@@ -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... */
diff -puN include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups include/linux/arcdevice.h
--- devel/include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/include/linux/arcdevice.h 2005-07-09 01:24:43.000000000 -0700
@@ -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 */
_
^ permalink raw reply [flat|nested] 6+ messages in thread
* [2.6 patch] drivers/net/arcnet/: possible cleanups
@ 2006-01-14 2:10 Adrian Bunk
2006-01-17 13:38 ` Jeff Garzik
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2006-01-14 2:10 UTC (permalink / raw)
To: Jeff Garzik, akpm, linux-kernel, netdev
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>
---
drivers/net/arcnet/arc-rawmode.c | 2 +-
drivers/net/arcnet/arcnet.c | 15 +++++++++------
drivers/net/arcnet/rfc1051.c | 2 +-
drivers/net/arcnet/rfc1201.c | 2 +-
include/linux/arcdevice.h | 10 ----------
5 files changed, 12 insertions(+), 19 deletions(-)
diff -puN drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/arcnet.c
--- devel/drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/arcnet.c 2005-07-09 01:24:43.000000000 -0700
@@ -61,6 +59,7 @@ static int null_build_header(struct sk_b
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
@@ -71,7 +70,7 @@ static int null_prepare_tx(struct net_de
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,
@@ -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;
diff -puN drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/arc-rawmode.c
--- devel/drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/arc-rawmode.c 2005-07-09 01:24:43.000000000 -0700
@@ -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,
diff -puN drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/rfc1051.c
--- devel/drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/rfc1051.c 2005-07-09 01:24:43.000000000 -0700
@@ -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,
diff -puN drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/rfc1201.c
--- devel/drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/rfc1201.c 2005-07-09 01:24:43.000000000 -0700
@@ -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... */
diff -puN include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups include/linux/arcdevice.h
--- devel/include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/include/linux/arcdevice.h 2005-07-09 01:24:43.000000000 -0700
@@ -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 */
_
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] drivers/net/arcnet/: possible cleanups
2006-01-14 2:10 Adrian Bunk
@ 2006-01-17 13:38 ` Jeff Garzik
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2006-01-17 13:38 UTC (permalink / raw)
To: Adrian Bunk; +Cc: akpm, linux-kernel, netdev
Adrian Bunk wrote:
> 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>
applied
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-01-17 13:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-15 0:48 [2.6 patch] drivers/net/arcnet/: possible cleanups Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2005-05-02 1:47 Adrian Bunk
[not found] <200509100617.j8A6Hpul002321@shell0.pdx.osdl.net>
[not found] ` <43281950.7000004@pobox.com>
2005-10-30 10:50 ` Adrian Bunk
2005-12-11 18:05 Adrian Bunk
2006-01-14 2:10 Adrian Bunk
2006-01-17 13:38 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).