projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f59d66
)
chelsio: Fix build warning.
author
David S. Miller
<davem@davemloft.net>
Tue, 13 Apr 2010 10:07:17 +0000
(
03:07
-0700)
committer
David S. Miller
<davem@davemloft.net>
Tue, 13 Apr 2010 10:07:17 +0000
(
03:07
-0700)
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>
drivers/net/chelsio/sge.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/chelsio/sge.c
b/drivers/net/chelsio/sge.c
index 475304fe4628280bda8870b0249776dda6b2c60e..a8ffc1e11c5fd6fd218377fd6217602f65574f69 100644
(file)
--- 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);