提交 18d777a5 编写于 作者: D David S. Miller

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: NDavid S. Miller <davem@davemloft.net>
上级 6f59d660
...@@ -460,7 +460,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb, ...@@ -460,7 +460,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb,
again: again:
for (i = 0; i < MAX_NPORTS; i++) { 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; skbq = &s->p[s->port].skbq;
skb = skb_peek(skbq); skb = skb_peek(skbq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册