diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-13 06:07:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-13 06:07:17 -0400 |
commit | 18d777a5bcf31491021f527d32b72dd16f911fe0 (patch) | |
tree | 128f7d733523ab54b1cd158e9276f428964da31b /drivers/net/chelsio/sge.c | |
parent | 6f59d6604d9361ef53a7721fb8aa1687ad6f8448 (diff) |
chelsio: Fix build warning.
GCC warns that:
drivers/net/chelsio/sge.c:463:11: warning: operation on 's->port' may be undefined
Better to eliminate the side effects in the calculation and
express what was intended here.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/chelsio/sge.c')
-rw-r--r-- | drivers/net/chelsio/sge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 475304fe4628..a8ffc1e11c5f 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -460,7 +460,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb, | |||
460 | 460 | ||
461 | again: | 461 | again: |
462 | for (i = 0; i < MAX_NPORTS; i++) { | 462 | for (i = 0; i < MAX_NPORTS; i++) { |
463 | s->port = ++s->port & (MAX_NPORTS - 1); | 463 | s->port = (s->port + 1) & (MAX_NPORTS - 1); |
464 | skbq = &s->p[s->port].skbq; | 464 | skbq = &s->p[s->port].skbq; |
465 | 465 | ||
466 | skb = skb_peek(skbq); | 466 | skb = skb_peek(skbq); |