From: Francois Romieu <romieu@fr.zoreil.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@oss.sgi.com, jdmason@us.ibm.com
Subject: [patch 2.6.11-rc4-netdev1 1/5] r8169: fix rx skb allocation error logging
Date: Tue, 22 Feb 2005 00:53:01 +0100 [thread overview]
Message-ID: <20050221235301.GA31723@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20050221235125.GD26248@electric-eye.fr.zoreil.com>
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>
diff -puN drivers/net/r8169.c~r8169-400 drivers/net/r8169.c
--- a/drivers/net/r8169.c~r8169-400 2005-02-17 21:50:09.820173216 +0100
+++ b/drivers/net/r8169.c 2005-02-17 22:00:00.210450784 +0100
@@ -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 *
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;
/*
_
next prev parent reply other threads:[~2005-02-21 23:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-21 23:51 [patch 2.6.11-rc4-netdev1 0/5] r8169: intro Francois Romieu
2005-02-21 23:53 ` Francois Romieu [this message]
2005-02-21 23:54 ` [patch 2.6.11-rc4-netdev1 2/5] r8169: skb alignment nitpicking Francois Romieu
2005-02-21 23:56 ` [patch 2.6.11-rc4-netdev1 3/5] r8169: removal of unused #define Francois Romieu
2005-02-21 23:57 ` [patch 2.6.11-rc4-netdev1 4/5] r8169: uniformize comments Francois Romieu
2005-02-21 23:58 ` [patch 2.6.11-rc4-netdev1 5/5] r8169: literate PCI ID Francois Romieu
2005-02-23 1:31 ` Jeff Garzik
2005-02-23 8:25 ` Francois Romieu
2005-02-22 0:26 ` [patch 2.6.11-rc4-netdev1 0/5] r8169: intro Jeff Garzik
2005-02-22 1:10 ` Francois Romieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050221235301.GA31723@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=jdmason@us.ibm.com \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).