Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry

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 <arushisinghal19971997@gmail.com>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1522000893-5331-3-git-send-email-arushisinghal19971997@gmail.com

authored by

Arushi Singhal and committed by
Daniel Vetter
3f07f28b aec06c76

+1 -1
+1 -1
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
··· 134 134 nvkm_volt_map(volt, volt->max2_id, clk->temp)); 135 135 136 136 for (cstate = start; &cstate->head != &pstate->list; 137 - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { 137 + cstate = list_prev_entry(cstate, head)) { 138 138 if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) 139 139 break; 140 140 }