drm/nouveau/clk: Use list_for_each_entry_from_reverse
authorArushi Singhal <arushisinghal19971997@gmail.com>
Tue, 8 May 2018 13:13:09 +0000 (23:13 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 18 May 2018 07:09:35 +0000 (17:09 +1000)
commitdd3b89be3eafd1c9977e350e81c5556230319101
tree2bd53f0896aadb75b0ddfe211678db5f95b4a46e
parent7a22c737faef99d6f75d7049c1a2f6f0fdefb1ec
drm/nouveau/clk: Use list_for_each_entry_from_reverse

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 "start" variable with "cstate" which helps in refactoring
the code and also "cstate" variable is more commonly used in the other
functions.

changes in v2:
"start" variable is removed, before "cstate" variable was removed
but "cstate" is more common so preferred "cstate" over "start".

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c