Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 646fe03b authored by Finn Thain's avatar Finn Thain Committed by David S. Miller
Browse files

net/8390: Fix msg_enable patch snafu



The lib8390 module parameter 'msg_enable' doesn't do anything useful:
it causes an ancient version string to be logged.

Remove redundant code that logs the same string.

In ne.c and wd.c, the value of ei_local->msg_enable is used before
being assigned. Use ne_msg_enable and wd_msg_enable, respectively.

Most of the other 8390 drivers never assign ei_local->msg_enable.
Use the 'msg_enable' module parameter from lib8390 as the default
value.

Eliminate the pointless static and local variables.

Clean up an indentation mistake.

All of these issues originated from the same patch.

Cc: Russell King <linux@armlinux.org.uk>
Fixes: c45f812f ("8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature")
Tested-by: default avatarStan Johnson <userm57@yahoo.com>
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73219de2
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -77,8 +77,6 @@ static unsigned char version[] = "ax88796.c: Copyright 2005,2007 Simtec Electron

#define AX_GPOC_PPDSET	BIT(6)

static u32 ax_msg_enable;

/* device private data */

struct ax_device {
@@ -747,7 +745,6 @@ static int ax_init_dev(struct net_device *dev)
	ei_local->block_output = &ax_block_output;
	ei_local->get_8390_hdr = &ax_get_8390_hdr;
	ei_local->priv = 0;
	ei_local->msg_enable = ax_msg_enable;

	dev->netdev_ops = &ax_netdev_ops;
	dev->ethtool_ops = &ax_ethtool_ops;
+0 −2
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ static void AX88190_init(struct net_device *dev, int startp);
static int ax_open(struct net_device *dev);
static int ax_close(struct net_device *dev);
static irqreturn_t ax_interrupt(int irq, void *dev_id);
static u32 axnet_msg_enable;

/*====================================================================*/

@@ -151,7 +150,6 @@ static int axnet_probe(struct pcmcia_device *link)
	return -ENOMEM;

    ei_local = netdev_priv(dev);
    ei_local->msg_enable = axnet_msg_enable;
    spin_lock_init(&ei_local->page_lock);

    info = PRIV(dev);
+0 −17
Original line number Diff line number Diff line
@@ -64,8 +64,6 @@ static char version[] =

#include "lib8390.c"

static u32 etherh_msg_enable;

struct etherh_priv {
	void __iomem	*ioc_fast;
	void __iomem	*memc;
@@ -501,18 +499,6 @@ etherh_close(struct net_device *dev)
	return 0;
}

/*
 * Initialisation
 */

static void __init etherh_banner(void)
{
	static int version_printed;

	if ((etherh_msg_enable & NETIF_MSG_DRV) && (version_printed++ == 0))
		pr_info("%s", version);
}

/*
 * Read the ethernet address string from the on board rom.
 * This is an ascii string...
@@ -671,8 +657,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
	struct etherh_priv *eh;
	int ret;

	etherh_banner();

	ret = ecard_request_resources(ec);
	if (ret)
		goto out;
@@ -757,7 +741,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
	ei_local->block_output  = etherh_block_output;
	ei_local->get_8390_hdr  = etherh_get_header;
	ei_local->interface_num = 0;
	ei_local->msg_enable = etherh_msg_enable;

	etherh_reset(dev);
	__NS8390_init(dev, 0);
+0 −4
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ static void hydra_block_input(struct net_device *dev, int count,
static void hydra_block_output(struct net_device *dev, int count,
			       const unsigned char *buf, int start_page);
static void hydra_remove_one(struct zorro_dev *z);
static u32 hydra_msg_enable;

static struct zorro_device_id hydra_zorro_tbl[] = {
    { ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET },
@@ -119,7 +118,6 @@ static int hydra_init(struct zorro_dev *z)
    int start_page, stop_page;
    int j;
    int err;
    struct ei_device *ei_local;

    static u32 hydra_offsets[16] = {
	0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
@@ -138,8 +136,6 @@ static int hydra_init(struct zorro_dev *z)
    start_page = NESM_START_PG;
    stop_page = NESM_STOP_PG;

    ei_local = netdev_priv(dev);
    ei_local->msg_enable = hydra_msg_enable;
    dev->base_addr = ioaddr;
    dev->irq = IRQ_AMIGA_PORTS;

+2 −0
Original line number Diff line number Diff line
@@ -975,6 +975,8 @@ static void ethdev_setup(struct net_device *dev)
	ether_setup(dev);

	spin_lock_init(&ei_local->page_lock);

	ei_local->msg_enable = msg_enable;
}

/**
Loading