mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
833fa74386
commit
fa08943b97
@ -237,10 +237,12 @@ static inline void sfq_link(struct sfq_sched_data *q, sfq_index x)
|
||||
}
|
||||
|
||||
#define sfq_unlink(q, x, n, p) \
|
||||
n = q->slots[x].dep.next; \
|
||||
p = q->slots[x].dep.prev; \
|
||||
sfq_dep_head(q, p)->next = n; \
|
||||
sfq_dep_head(q, n)->prev = p
|
||||
do { \
|
||||
n = q->slots[x].dep.next; \
|
||||
p = q->slots[x].dep.prev; \
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user