aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/fore200e.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-11-18 14:49:25 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-18 14:49:25 -0500
commit30dfe2c05037fbc021121c037872c09956938c2f (patch)
tree2db9f69aaddf6109946810a53d837a25ae595757 /drivers/atm/fore200e.c
parent57e1ab6eaddc9f2c358cd4afb497cda6e3c6821a (diff)
atm: fore200e: Fix build warning.
GCC (rightfully) complains that: drivers/atm/fore200e.c:614:5: warning: operation on 'cmdq->head' may be undefined This is due to the FORE200E_NEXT_ENTRY macro, which essentially evaluates to: i = ++i % m Make it what's explicitly intended here which is: i = (i + 1) % m and the warning goes away. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/fore200e.c')
-rw-r--r--drivers/atm/fore200e.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index c8fc69c85a06..c09761959354 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -92,7 +92,7 @@
92 92
93#define FORE200E_INDEX(virt_addr, type, index) (&((type *)(virt_addr))[ index ]) 93#define FORE200E_INDEX(virt_addr, type, index) (&((type *)(virt_addr))[ index ])
94 94
95#define FORE200E_NEXT_ENTRY(index, modulo) (index = ++(index) % (modulo)) 95#define FORE200E_NEXT_ENTRY(index, modulo) (index = ((index) + 1) % (modulo))
96 96
97#if 1 97#if 1
98#define ASSERT(expr) if (!(expr)) { \ 98#define ASSERT(expr) if (!(expr)) { \