From: David S. Miller Date: Tue, 13 Apr 2010 10:07:17 +0000 (-0700) Subject: chelsio: Fix build warning. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=18d777a5bcf31491021f527d32b72dd16f911fe0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 --- 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, 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);