]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] r8169: fix rx skb allocation error logging
authorFrançois Romieu <romieu@fr.zoreil.com>
Tue, 22 Feb 2005 15:44:13 +0000 (10:44 -0500)
committerJeff Garzik <jgarzik@pobox.com>
Tue, 22 Feb 2005 15:44:13 +0000 (10:44 -0500)
Fix rx skb allocation error logging

Signed arithmetic is not required as rtl8169_rx_fill() return belongs
to the [0; NUM_RX_DESC] interval.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/r8169.c

index 3f7171fbaebc8e172378aad6051a25d3c0ac1803..289059d9bb5b8a1f7cdfa8492918cdee3cd3c6b6 100644 (file)
@@ -2156,8 +2156,8 @@ static int
 rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
                     void __iomem *ioaddr)
 {
-       unsigned int cur_rx, rx_left, count;
-       int delta;
+       unsigned int cur_rx, rx_left;
+       unsigned int delta, count;
 
        assert(dev != NULL);
        assert(tp != NULL);
@@ -2225,10 +2225,8 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
        tp->cur_rx = cur_rx;
 
        delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx);
-       if (delta < 0) {
+       if (!delta && count)
                printk(KERN_INFO "%s: no Rx buffer allocated\n", dev->name);
-               delta = 0;
-       }
        tp->dirty_rx += delta;
 
        /*