diff options
author | Geliang Tang <geliangtang@gmail.com> | 2016-12-20 17:02:20 +0300 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2016-12-22 12:04:08 +0300 |
commit | 2f60b28831c7e63759b59113898e6fe4dc90dd43 (patch) | |
tree | 89d73950cb35df2b8ada0b26c60a40269a8fb58d /drivers/xen/evtchn.c | |
parent | 7ecec8503af37de6be4f96b53828d640a968705f (diff) | |
download | linux-2f60b28831c7e63759b59113898e6fe4dc90dd43.tar.xz |
xen/evtchn: use rb_entry()
To make the code clearer, use rb_entry() instead of container_of() to
deal with rbtree.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen/evtchn.c')
-rw-r--r-- | drivers/xen/evtchn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c index e8c7f09d01be..6890897a6f30 100644 --- a/drivers/xen/evtchn.c +++ b/drivers/xen/evtchn.c @@ -125,7 +125,7 @@ static int add_evtchn(struct per_user_data *u, struct user_evtchn *evtchn) while (*new) { struct user_evtchn *this; - this = container_of(*new, struct user_evtchn, node); + this = rb_entry(*new, struct user_evtchn, node); parent = *new; if (this->port < evtchn->port) @@ -157,7 +157,7 @@ static struct user_evtchn *find_evtchn(struct per_user_data *u, unsigned port) while (node) { struct user_evtchn *evtchn; - evtchn = container_of(node, struct user_evtchn, node); + evtchn = rb_entry(node, struct user_evtchn, node); if (evtchn->port < port) node = node->rb_left; |