Skip to content

Commit

Permalink
chelsio: Fix build warning.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Apr 13, 2010
1 parent 6f59d66 commit 18d777a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/chelsio/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb,

again:
for (i = 0; i < MAX_NPORTS; i++) {
s->port = ++s->port & (MAX_NPORTS - 1);
s->port = (s->port + 1) & (MAX_NPORTS - 1);
skbq = &s->p[s->port].skbq;

skb = skb_peek(skbq);
Expand Down

0 comments on commit 18d777a

Please sign in to comment.