summaryrefslogtreecommitdiff
path: root/net/sched/sch_sfq.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2013-12-10 16:55:33 +0400
committerDavid S. Miller <davem@davemloft.net>2013-12-11 07:44:52 +0400
commitfa08943b975c08697e57aff26784970dd0dd926a (patch)
tree650d20dbba46b044c9a0390d84b65bae03d2c85e /net/sched/sch_sfq.c
parent833fa7438659d768f0aee862aab4a30cde362bbf (diff)
downloadlinux-fa08943b975c08697e57aff26784970dd0dd926a.tar.xz
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>
Diffstat (limited to 'net/sched/sch_sfq.c')
-rw-r--r--net/sched/sch_sfq.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index d3a1bc26dbfc..76f01e0258df 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -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)