提交 fa08943b 编写于 作者: Y Yang Yingliang 提交者: David S. Miller

net_sched: sfq: put sfq_unlink in a do - while loop

Macros with multiple statements should be enclosed in a do - while loop
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 833fa743
...@@ -237,10 +237,12 @@ static inline void sfq_link(struct sfq_sched_data *q, sfq_index x) ...@@ -237,10 +237,12 @@ static inline void sfq_link(struct sfq_sched_data *q, sfq_index x)
} }
#define sfq_unlink(q, x, n, p) \ #define sfq_unlink(q, x, n, p) \
n = q->slots[x].dep.next; \ do { \
p = q->slots[x].dep.prev; \ n = q->slots[x].dep.next; \
sfq_dep_head(q, p)->next = n; \ p = q->slots[x].dep.prev; \
sfq_dep_head(q, n)->prev = p sfq_dep_head(q, p)->next = n; \
sfq_dep_head(q, n)->prev = p; \
} while (0)
static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x) static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册