Skip to content

Commit

Permalink
sh_eth: remove redundant test on unsigned
Browse files Browse the repository at this point in the history
Unsigned boguscnt cannot be less than 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
roel kluin authored and David S. Miller committed Jun 26, 2009
1 parent e2a61fa commit 37c8ae3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/net/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 37c8ae3

Please sign in to comment.