Skip to contentSkip to conversation

sh_eth: remove redundant test on unsigned

PATCH In review Roel Kluin 2 participants 2 messages Jun 22, 2009 – Jun 23, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 sh_eth: remove redundant test on unsigned

Unsigned boguscnt cannot be less than 0.

---
or should I make boguscnt int?

drivers/net/sh_eth.c +1 -8
index 341882f..a2d82dd 100644
@@ -865,8 +865,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
 	struct sh_eth_private *mdp = netdev_priv(ndev);
 	struct sh_eth_cpu_data *cd = mdp->cd;
 	irqreturn_t ret = IRQ_NONE;
-	u32 ioaddr, boguscnt = RX_RING_SIZE;
-	u32 intr_status = 0;
+	u32 ioaddr, intr_status = 0;
 
 	ioaddr = ndev->base_addr;
 	spin_lock(&mdp->lock);
@@ -901,12 +900,6 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
 	if (intr_status & cd->eesr_err_check)
 		sh_eth_error(ndev, intr_status);
 
-	if (--boguscnt < 0) {
-		printk(KERN_WARNING
-		       "%s: Too much work at interrupt, status=0x%4.4x.\n",
-		       ndev->name, intr_status);
-	}
-
 other_irq:
 	spin_unlock(&mdp->lock);
 
maintainer
#1 lore raw

From: Roel Kluin <[email protected]>
Date: Mon, 22 Jun 2009 19:38:00 +0200

Quoted 3 lines

Unsigned boguscnt cannot be less than 0.

To be honest since this never possibly triggered, it never provided any help diagnosing any problem, so removing the test altogether is likely best.

I'll integrate this once -rc1 is out and it's OK for 2.6.32 bound stuff to start showing up in linux-next.

Thanks!