From: Andrew Morton <akpm@osdl.org>
To: Dave Jones <davej@redhat.com>
Cc: linux.nics@intel.com, linux-kernel@vger.kernel.org
Subject: Re: ixgb boolean typo ?
Date: Mon, 2 Aug 2004 23:03:07 -0700 [thread overview]
Message-ID: <20040802230307.6a26dac0.akpm@osdl.org> (raw)
In-Reply-To: <20040803005536.GA12571@redhat.com>
Dave Jones <davej@redhat.com> wrote:
>
> Is this perhaps what was meant to be here ?
>
> Dave
>
> --- 1/drivers/net/ixgb/ixgb_main.c~ 2004-08-03 01:18:00.000000000 +0100
> +++ 2/drivers/net/ixgb/ixgb_main.c 2004-08-03 01:53:46.653695768 +0100
> @@ -1615,7 +1615,7 @@
> }
> #else
> for (i = 0; i < IXGB_MAX_INTR; i++)
> - if (!ixgb_clean_rx_irq(adapter) & !ixgb_clean_tx_irq(adapter))
> + if (!ixgb_clean_rx_irq(adapter) && !ixgb_clean_tx_irq(adapter))
> break;
> /* if RAIDC:EN == 1 and ICR:RXDMT0 == 1, we need to
> * set IMS:RXDMT0 to 1 to restart the RBD timer (POLL)
Both versions will do the same thing, inefficiently: keep going until both
functions return false. And keep pointlessly calling a functions which is
returning FALSE all the time.
I think this would be better:
--- 25/drivers/net/ixgb/ixgb_main.c~igxb-speedup 2004-08-02 23:01:04.810311392 -0700
+++ 25-akpm/drivers/net/ixgb/ixgb_main.c 2004-08-02 23:02:18.475112640 -0700
@@ -1615,8 +1615,12 @@ static irqreturn_t ixgb_intr(int irq, vo
}
#else
for (i = 0; i < IXGB_MAX_INTR; i++)
- if (!ixgb_clean_rx_irq(adapter) & !ixgb_clean_tx_irq(adapter))
+ if (ixgb_clean_rx_irq(adapter) == FALSE)
break;
+ for (i = 0; i < IXGB_MAX_INTR; i++)
+ if (ixgb_clean_tx_irq(adapter) == FALSE)
+ break;
+
/* if RAIDC:EN == 1 and ICR:RXDMT0 == 1, we need to
* set IMS:RXDMT0 to 1 to restart the RBD timer (POLL)
*/
_
next prev parent reply other threads:[~2004-08-03 6:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-03 0:55 Dave Jones
2004-08-03 6:03 ` Andrew Morton [this message]
2004-08-03 10:35 ` Herbert Xu
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=20040802230307.6a26dac0.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux.nics@intel.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
all inboxes | Powered by JetHome®