From: Chris Wilson Date: Mon, 5 Dec 2016 14:29:41 +0000 (+0000) Subject: drm/i915/execlists: Use list_safe_reset_next() instead of opencoding X-Git-Tag: v4.14-rc1~674^2~37^2~687 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0798cff46bb2fc9ac24d5d465216db235a8f11f6;p=platform%2Fkernel%2Flinux-rpi3.git drm/i915/execlists: Use list_safe_reset_next() instead of opencoding list.h provides a macro for updating the next element in a safe list-iter, so let's use it so that it is hopefully clearer to the reader about the unusual behaviour, and also easier to grep. Signed-off-by: Chris Wilson Reviewed-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20161205142941.21965-6-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 67aec8f..8b41288 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -733,7 +733,7 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio) if (prio > READ_ONCE(p->signaler->priority)) list_move_tail(&p->dfs_link, &dfs); - p = list_next_entry(dep, dfs_link); + list_safe_reset_next(dep, p, dfs_link); if (!RB_EMPTY_NODE(&pt->node)) continue;