* [PATCH] drivers/net: correct valid flag
@ 2010-07-05 15:07 Julia Lawall
2010-07-06 1:03 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2010-07-05 15:07 UTC (permalink / raw)
To: netdev, linux-kernel, kernel-janitors
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)) {
dprintk(KERN_DEBUG "%s: nv_tx_done_optimized: flags 0x%x.\n",
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/net: correct valid flag
2010-07-05 15:07 [PATCH] drivers/net: correct valid flag Julia Lawall
@ 2010-07-06 1:03 ` David Miller
2010-07-06 5:07 ` Julia Lawall
2010-07-06 5:11 ` Julia Lawall
0 siblings, 2 replies; 5+ messages in thread
From: David Miller @ 2010-07-06 1:03 UTC (permalink / raw)
To: julia; +Cc: netdev, linux-kernel, kernel-janitors
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/net: correct valid flag
2010-07-06 1:03 ` David Miller
@ 2010-07-06 5:07 ` Julia Lawall
2010-07-06 5:11 ` Julia Lawall
1 sibling, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2010-07-06 5:07 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel, kernel-janitors
On Mon, 5 Jul 2010, David Miller wrote:
> 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.
OK, I'll put it back.
julia
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/net: correct valid flag
2010-07-06 1:03 ` David Miller
2010-07-06 5:07 ` Julia Lawall
@ 2010-07-06 5:11 ` Julia Lawall
2010-07-06 5:16 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2010-07-06 5:11 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel, kernel-janitors
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..9ef6a9d 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2468,7 +2468,7 @@ 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)) {
dprintk(KERN_DEBUG "%s: nv_tx_done_optimized: flags 0x%x.\n",
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/net: correct valid flag
2010-07-06 5:11 ` Julia Lawall
@ 2010-07-06 5:16 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2010-07-06 5:16 UTC (permalink / raw)
To: julia; +Cc: netdev, linux-kernel, kernel-janitors
From: Julia Lawall <julia@diku.dk>
Date: Tue, 6 Jul 2010 07:11:45 +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>
Since the two values are identical this doesn't fix a bug, so I've
applied this to net-next-2.6
Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-06 5:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-05 15:07 [PATCH] drivers/net: correct valid flag Julia Lawall
2010-07-06 1:03 ` David Miller
2010-07-06 5:07 ` Julia Lawall
2010-07-06 5:11 ` Julia Lawall
2010-07-06 5:16 ` David Miller
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).