Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-07 Thread Michal Hocko
On Sat 05-12-15 10:55:42, Geliang Tang wrote: > On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > > To make the intention clearer, use list_{first,next}_entry instead > > > of list_entry. > > > > Does this really help readability?

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-07 Thread Michal Hocko
On Sat 05-12-15 10:55:42, Geliang Tang wrote: > On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > > To make the intention clearer, use list_{first,next}_entry instead > > > of list_entry. > > > > Does this really help readability?

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-05 Thread Johannes Weiner
On Sat, Dec 05, 2015 at 10:55:42AM +0800, Geliang Tang wrote: > On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > > To make the intention clearer, use list_{first,next}_entry instead > > > of list_entry. > > > > Does this really

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-05 Thread Johannes Weiner
On Sat, Dec 05, 2015 at 10:55:42AM +0800, Geliang Tang wrote: > On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > > To make the intention clearer, use list_{first,next}_entry instead > > > of list_entry. > > > > Does this really

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-04 Thread Geliang Tang
On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > To make the intention clearer, use list_{first,next}_entry instead > > of list_entry. > > Does this really help readability? This function simply uncharges the > given list of pages.

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-04 Thread Michal Hocko
On Thu 03-12-15 14:27:50, Johannes Weiner wrote: > On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > > To make the intention clearer, use list_{first,next}_entry instead > > > of list_entry. > > > > Does this really help

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-04 Thread Michal Hocko
On Thu 03-12-15 14:27:50, Johannes Weiner wrote: > On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > > To make the intention clearer, use list_{first,next}_entry instead > > > of list_entry. > > > > Does this really help

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-04 Thread Geliang Tang
On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > To make the intention clearer, use list_{first,next}_entry instead > > of list_entry. > > Does this really help readability? This function simply uncharges the > given list of pages.

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-03 Thread Johannes Weiner
On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > To make the intention clearer, use list_{first,next}_entry instead > > of list_entry. > > Does this really help readability? This function simply uncharges the > given list of pages.

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-03 Thread Michal Hocko
On Thu 03-12-15 22:16:55, Geliang Tang wrote: > To make the intention clearer, use list_{first,next}_entry instead > of list_entry. Does this really help readability? This function simply uncharges the given list of pages. Why cannot we simply use list_for_each_entry instead... > Signed-off-by:

[PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-03 Thread Geliang Tang
To make the intention clearer, use list_{first,next}_entry instead of list_entry. Signed-off-by: Geliang Tang --- mm/memcontrol.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 79a29d5..a6301ea 100644 --- a/mm/memcontrol.c

[PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-03 Thread Geliang Tang
To make the intention clearer, use list_{first,next}_entry instead of list_entry. Signed-off-by: Geliang Tang --- mm/memcontrol.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 79a29d5..a6301ea 100644 ---

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-03 Thread Michal Hocko
On Thu 03-12-15 22:16:55, Geliang Tang wrote: > To make the intention clearer, use list_{first,next}_entry instead > of list_entry. Does this really help readability? This function simply uncharges the given list of pages. Why cannot we simply use list_for_each_entry instead... > Signed-off-by:

Re: [PATCH] mm/memcontrol.c: use list_{first,next}_entry

2015-12-03 Thread Johannes Weiner
On Thu, Dec 03, 2015 at 05:27:18PM +0100, Michal Hocko wrote: > On Thu 03-12-15 22:16:55, Geliang Tang wrote: > > To make the intention clearer, use list_{first,next}_entry instead > > of list_entry. > > Does this really help readability? This function simply uncharges the > given list of pages.