Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa08943b authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller
Browse files

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: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 833fa743
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -237,10 +237,12 @@ static inline void sfq_link(struct sfq_sched_data *q, sfq_index x)
}

#define sfq_unlink(q, x, n, 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
		sfq_dep_head(q, n)->prev = p;	\
	} while (0)


static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x)