Re: [PATCH] net/mlx4: use rb_entry()

2017-01-22 Thread David Miller
From: Leon Romanovsky Date: Sun, 22 Jan 2017 09:48:39 +0200 > I don't understand completely the rationale behind this conversion. > rb_entry == container_of, why do we need another name for it? Because it's an annotation. Either you agree that the macro exists and it should be used in every spo

Re: [PATCH] net/mlx4: use rb_entry()

2017-01-22 Thread David Miller
From: Geliang Tang Date: Fri, 20 Jan 2017 22:36:57 +0800 > To make the code clearer, use rb_entry() instead of container_of() to > deal with rbtree. > > Signed-off-by: Geliang Tang Applied.

Re: [PATCH] net/mlx4: use rb_entry()

2017-01-22 Thread Leon Romanovsky
On Sun, Jan 22, 2017 at 10:42:25PM +0800, Geliang Tang wrote: > On Sun, Jan 22, 2017 at 09:48:39AM +0200, Leon Romanovsky wrote: > > On Fri, Jan 20, 2017 at 10:36:57PM +0800, Geliang Tang wrote: > > > To make the code clearer, use rb_entry() instead of container_of() to > > > deal with rbtree. > >

Re: [PATCH] net/mlx4: use rb_entry()

2017-01-22 Thread Geliang Tang
On Sun, Jan 22, 2017 at 09:48:39AM +0200, Leon Romanovsky wrote: > On Fri, Jan 20, 2017 at 10:36:57PM +0800, Geliang Tang wrote: > > To make the code clearer, use rb_entry() instead of container_of() to > > deal with rbtree. > > > > Signed-off-by: Geliang Tang > > --- > > drivers/net/ethernet/mel

Re: [PATCH] net/mlx4: use rb_entry()

2017-01-21 Thread Leon Romanovsky
On Fri, Jan 20, 2017 at 10:36:57PM +0800, Geliang Tang wrote: > To make the code clearer, use rb_entry() instead of container_of() to > deal with rbtree. > > Signed-off-by: Geliang Tang > --- > drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 8 > 1 file changed, 4 insertions(+),

[PATCH] net/mlx4: use rb_entry()

2017-01-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tr