Commit 2cf73b87 authored by François Romieu's avatar François Romieu Committed by Jeff Garzik

[PATCH] r8169: fix rx skb allocation error logging

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: default avatarJon Mason <jdmason@us.ibm.com>
Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 1bdf5f6b
...@@ -2156,8 +2156,8 @@ static int ...@@ -2156,8 +2156,8 @@ static int
rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp, rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
void __iomem *ioaddr) void __iomem *ioaddr)
{ {
unsigned int cur_rx, rx_left, count; unsigned int cur_rx, rx_left;
int delta; unsigned int delta, count;
assert(dev != NULL); assert(dev != NULL);
assert(tp != NULL); assert(tp != NULL);
...@@ -2225,10 +2225,8 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp, ...@@ -2225,10 +2225,8 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
tp->cur_rx = cur_rx; tp->cur_rx = cur_rx;
delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->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); printk(KERN_INFO "%s: no Rx buffer allocated\n", dev->name);
delta = 0;
}
tp->dirty_rx += delta; tp->dirty_rx += delta;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment