diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2013-12-10 13:55:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-11 04:44:52 +0100 |
commit | fa08943b975c08697e57aff26784970dd0dd926a (patch) | |
tree | 650d20dbba46b044c9a0390d84b65bae03d2c85e /net | |
parent | net_sched: add space around '>' and before '(' (diff) | |
download | linux-fa08943b975c08697e57aff26784970dd0dd926a.tar.xz linux-fa08943b975c08697e57aff26784970dd0dd926a.zip |
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')
-rw-r--r-- | net/sched/sch_sfq.c | 10 |
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) |