From: Yang Yingliang Date: Tue, 10 Dec 2013 12:55:33 +0000 (+0800) Subject: net_sched: sfq: put sfq_unlink in a do - while loop X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fa08943b975c08697e57aff26784970dd0dd926a;p=linux-beck.git 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 Signed-off-by: David S. Miller --- 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)