Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f07f28b authored by Arushi Singhal's avatar Arushi Singhal Committed by Daniel Vetter
Browse files

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: default avatarArushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1522000893-5331-3-git-send-email-arushisinghal19971997@gmail.com
parent aec06c76
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate,
			       nvkm_volt_map(volt, volt->max2_id, clk->temp));

	for (cstate = start; &cstate->head != &pstate->list;
	     cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) {
	     cstate = list_prev_entry(cstate, head)) {
		if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp))
			break;
	}