[PATCH v2] gpu: drm: nouveau: Use list_for_each_entry_from_reverse

2018-03-27 Thread Arushi Singhal
t; which helps in refactoring the code and also "cstate" variable is more commonly used in the other functions. Signed-off-by: Arushi Singhal --- changes in v2: "start" variable is removed, before "cstate" variable was removed but "cstate" is more common so

Re: [PATCH] gpu: drm: nouveau: Use list_for_each_entry_from_reverse

2018-03-27 Thread Arushi Singhal
On Tue, Mar 27, 2018 at 2:44 PM, Ben Skeggs wrote: > On 27 March 2018 at 19:11, Arushi Singhal > wrote: > > It's better to use "list_for_each_entry_from_reverse" for iterating list > > than "for loop" as it makes the code more clear to r

[PATCH] gpu: drm: nouveau: Use list_for_each_entry_from_reverse

2018-03-27 Thread Arushi Singhal
It's better to use "list_for_each_entry_from_reverse" for iterating list than "for loop" as it makes the code more clear to read. This patch replace "for loop" with "list_for_each_entry_from_reverse" and remove "cstate" variable as it i

[PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry

2018-03-25 Thread Arushi Singhal
It's better to use list_entry instead of list_{next/prev}_entry as it makes the code more clear to read. This patch replace list_entry with list_{next/prev}_entry. Signed-off-by: Arushi Singhal --- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH v2 1/2] gpu: drm/lease:: Use list_{next/prev}_entry instead of list_entry

2018-03-25 Thread Arushi Singhal
It's better to use list_entry instead of list_{next/prev}_entry as it makes the code more clear to read. This patch replace list_entry with list_{next/prev}_entry. Signed-off-by: Arushi Singhal --- drivers/gpu/drm/drm_lease.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH v2 0/2] drm: Replace list_entry

2018-03-25 Thread Arushi Singhal
Replace list_entry with list_{next/prev}_entry. Arushi Singhal (2): gpu: drm/lease:: Use list_{next/prev}_entry instead of list_entry gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry drivers/gpu/drm/drm_lease.c| 2 +- drivers/gpu/drm/nouveau/nvkm

Re: [Outreachy kernel] [PATCH] gpu: drm: Use list_{next/prev}_entry instead of list_entry

2018-03-25 Thread Arushi Singhal
On Mon, Mar 19, 2018 at 12:44 PM, Julia Lawall wrote: > > > On Mon, 19 Mar 2018, Arushi Singhal wrote: > > > This patch replace list_entry with list_{next/prev}_entry as it makes > > the code more clear to read. > > Done using coccinelle: > > > > @@ >

Re: [Outreachy kernel] [PATCH] gpu: drm: Use list_{next/prev}_entry instead of list_entry

2018-03-25 Thread Arushi Singhal
On Mon, Mar 19, 2018 at 12:44 PM, Julia Lawall wrote: > > > On Mon, 19 Mar 2018, Arushi Singhal wrote: > > > This patch replace list_entry with list_{next/prev}_entry as it makes > > the code more clear to read. > > Done using coccinelle: > > > > @@ >

[PATCH] gpu: drm: Use list_{next/prev}_entry instead of list_entry

2018-03-18 Thread Arushi Singhal
ed-off-by: Arushi Singhal --- drivers/gpu/drm/drm_lease.c| 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c index 1402c0e..4dcfb5f 100644 --- a/d

[PATCH] gpu: drm: Use list_first_entry instead of list_entry

2018-03-18 Thread Arushi Singhal
This patch replaces list_entry with list_first_entry as it makes the code more clear. Done using coccinelle: @@ expression e; @@ ( - list_entry(e->next, + list_first_entry(e, ...) | - list_entry(e->prev, + list_last_entry(e, ...) ) Signed-off-by: Arushi Singhal --- drivers/gpu/d