From: Geliang Tang Date: Tue, 20 Dec 2016 14:02:16 +0000 (+0800) Subject: net_sched: sch_netem: use rb_entry() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7f7cd56c33937c6afa8a3d1f10a804c314e5b308;p=linux-beck.git net_sched: sch_netem: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 9f7b380cf0a3..b7e4097bfdab 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -152,7 +152,7 @@ struct netem_skb_cb { static struct sk_buff *netem_rb_to_skb(struct rb_node *rb) { - return container_of(rb, struct sk_buff, rbnode); + return rb_entry(rb, struct sk_buff, rbnode); } static inline struct netem_skb_cb *netem_skb_cb(struct sk_buff *skb)