提交 30dfe2c0 编写于 作者: D David S. Miller

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: NDavid S. Miller <davem@davemloft.net>
上级 57e1ab6e
......@@ -92,7 +92,7 @@
#define FORE200E_INDEX(virt_addr, type, index) (&((type *)(virt_addr))[ index ])
#define FORE200E_NEXT_ENTRY(index, modulo) (index = ++(index) % (modulo))
#define FORE200E_NEXT_ENTRY(index, modulo) (index = ((index) + 1) % (modulo))
#if 1
#define ASSERT(expr) if (!(expr)) { \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册