Commit 28fc1f5a authored by Jeff Garzik's avatar Jeff Garzik Committed by David S. Miller
Browse files

[netdrvr] irq handler minor cleanups in several drivers



* use irq_handler_t where appropriate

* no need to use 'irq' function arg, its already stored in a data struct

* rename irq handler 'irq' argument to 'dummy', where the function
  has been analyzed and proven not to use its first argument.

* remove always-false "dev_id == NULL" test from irq handlers

* remove pointless casts from void*

* declance: irq argument is not const

* add KERN_xxx printk prefix

* fix minor whitespace weirdness

Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 1b36efe0
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -497,11 +497,6 @@ simeth_interrupt(int irq, void *dev_id)
{
	struct net_device *dev = dev_id;

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

	/*
	 * very simple loop because we get interrupts only when receiving
	 */
+2 −2
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ scc_enet_interrupt(int irq, void * dev_id)
	ushort	int_events;
	int	must_restart;

	cep = (struct scc_enet_private *)dev->priv;
	cep = dev->priv;

	/* Get the interrupt events that caused us to be here.
	*/
+2 −2
Original line number Diff line number Diff line
@@ -532,7 +532,7 @@ fcc_enet_interrupt(int irq, void * dev_id)
	ushort	int_events;
	int	must_restart;

	cep = (struct fcc_enet_private *)dev->priv;
	cep = dev->priv;

	/* Get the interrupt events that caused us to be here.
	*/
+0 −3
Original line number Diff line number Diff line
@@ -661,9 +661,6 @@ static irqreturn_t cpmac_irq(int irq, void *dev_id)
	int queue;
	u32 status;

	if (!dev)
		return IRQ_NONE;

	priv = netdev_priv(dev);

	status = cpmac_read(priv->regs, CPMAC_MAC_INT_VECTOR);
+3 −3
Original line number Diff line number Diff line
@@ -719,15 +719,15 @@ static void lance_tx(struct net_device *dev)
	spin_unlock(&lp->lock);
}

static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id)
static irqreturn_t lance_dma_merr_int(int irq, void *dev_id)
{
	struct net_device *dev = dev_id;

	printk("%s: DMA error\n", dev->name);
	printk(KERN_ERR "%s: DMA error\n", dev->name);
	return IRQ_HANDLED;
}

static irqreturn_t lance_interrupt(const int irq, void *dev_id)
static irqreturn_t lance_interrupt(int irq, void *dev_id)
{
	struct net_device *dev = dev_id;
	struct lance_private *lp = netdev_priv(dev);
Loading