netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: julia@diku.dk
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drivers/net: correct valid flag
Date: Mon, 05 Jul 2010 18:03:49 -0700 (PDT)	[thread overview]
Message-ID: <20100705.180349.112607097.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.64.1007051706530.15185@ask.diku.dk>

From: Julia Lawall <julia@diku.dk>
Date: Mon, 5 Jul 2010 17:07:15 +0200 (CEST)

> From: Julia Lawall <julia@diku.dk>
> 
> Elsewhere in the "optimized" functions, the "2" constants are used.
> NV_TX_VALID and NV_TX2_VALID have the same value.
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>
> 
> ---
> diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> index 268ea4d..870c18b 100644
> --- a/drivers/net/forcedeth.c
> +++ b/drivers/net/forcedeth.c
> @@ -2468,7 +2468,8 @@ static int nv_tx_done_optimized(struct net_device *dev, int limit)
>  	struct ring_desc_ex* orig_get_tx = np->get_tx.ex;
>  
>  	while ((np->get_tx.ex != np->put_tx.ex) &&
> -	       !((flags = le32_to_cpu(np->get_tx.ex->flaglen)) & NV_TX_VALID) &&
> +	       !((flags = le32_to_cpu(np->get_tx.ex->flaglen)) & NV_TX2_VALID)
> +	       &&
>  	       (tx_work < limit)) {

Please don't put that "&&" on a line by itself.  I don't care if leaving it
on the previous line makes it exceed 80 columns, what you're doing here is
infinitely less pleasant to read.

  reply	other threads:[~2010-07-06  1:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 15:07 [PATCH] drivers/net: correct valid flag Julia Lawall
2010-07-06  1:03 ` David Miller [this message]
2010-07-06  5:07   ` Julia Lawall
2010-07-06  5:11   ` Julia Lawall
2010-07-06  5:16     ` David Miller

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=20100705.180349.112607097.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).