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

Commit c31f28e7 authored by Jeff Garzik's avatar Jeff Garzik
Browse files

drivers/net: eliminate irq handler impossible checks, needless casts



- Eliminate check for irq handler 'dev_id==NULL' where the
  condition never occurs.

- Eliminate needless casts to/from void*

Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 86d91bab
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -912,16 +912,11 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
static irqreturn_t
el3_interrupt(int irq, void *dev_id)
{
	struct net_device *dev = (struct net_device *)dev_id;
	struct net_device *dev = dev_id;
	struct el3_private *lp;
	int ioaddr, status;
	int i = max_interrupt_work;

	if (dev == NULL) {
		printk ("el3_interrupt(): irq %d for unknown device.\n", irq);
		return IRQ_NONE;
	}

	lp = netdev_priv(dev);
	spin_lock(&lp->lock);

+2 −5
Original line number Diff line number Diff line
@@ -902,14 +902,11 @@ static void *alloc_rfa(struct net_device *dev, void *ptr)
static irqreturn_t
elmc_interrupt(int irq, void *dev_id)
{
	struct net_device *dev = (struct net_device *) dev_id;
	struct net_device *dev = dev_id;
	unsigned short stat;
	struct priv *p;

	if (dev == NULL) {
		printk(KERN_ERR "elmc-interrupt: irq %d for unknown device.\n", irq);
		return IRQ_NONE;
	} else if (!netif_running(dev)) {
	if (!netif_running(dev)) {
		/* The 3c523 has this habit of generating interrupts during the
		   reset.  I'm not sure if the ni52 has this same problem, but it's
		   really annoying if we haven't finished initializing it.  I was
+0 −5
Original line number Diff line number Diff line
@@ -1324,11 +1324,6 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
	int rx_event = 0;
	int tx_event = 0;

	if (dev == NULL) {
		printk(KERN_WARNING "%s: irq %d for unknown device.\n", cardname, irq);
		return IRQ_NONE;
	}

	ioaddr = dev->base_addr;
	lp = netdev_priv(dev);

+1 −7
Original line number Diff line number Diff line
@@ -406,14 +406,8 @@ irqreturn_t ei_interrupt(int irq, void *dev_id)
	int interrupts, nr_serviced = 0;
	struct ei_device *ei_local;

	if (dev == NULL)
	{
		printk ("net_interrupt(): irq %d for unknown device.\n", irq);
		return IRQ_NONE;
	}

	e8390_base = dev->base_addr;
	ei_local = (struct ei_device *) netdev_priv(dev);
	ei_local = netdev_priv(dev);

	/*
	 *	Protect the irq test too.
+1 −5
Original line number Diff line number Diff line
@@ -598,17 +598,13 @@ static int atp_send_packet(struct sk_buff *skb, struct net_device *dev)
   Handle the network interface interrupts. */
static irqreturn_t atp_interrupt(int irq, void *dev_instance)
{
	struct net_device *dev = (struct net_device *)dev_instance;
	struct net_device *dev = dev_instance;
	struct net_local *lp;
	long ioaddr;
	static int num_tx_since_rx;
	int boguscount = max_interrupt_work;
	int handled = 0;

	if (dev == NULL) {
		printk(KERN_ERR "ATP_interrupt(): irq %d for unknown device.\n", irq);
		return IRQ_NONE;
	}
	ioaddr = dev->base_addr;
	lp = netdev_priv(dev);

Loading