drm/msm: Use list_move_tail instead of list_del/list_add_tail in msm_gem.c

Using list_move_tail() instead of list_del() + list_add_tail() in msm_gem.c.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Link: https://lore.kernel.org/r/20210609072838.1369371-1-libaokun1@huawei.com
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
Baokun Li 2021-06-09 15:28:38 +08:00 committed by Rob Clark
parent c9f737c798
commit a83cc4fb19
1 changed files with 1 additions and 2 deletions

View File

@ -792,8 +792,7 @@ void msm_gem_active_get(struct drm_gem_object *obj, struct msm_gpu *gpu)
mutex_lock(&priv->mm_lock); mutex_lock(&priv->mm_lock);
if (msm_obj->evictable) if (msm_obj->evictable)
mark_unevictable(msm_obj); mark_unevictable(msm_obj);
list_del(&msm_obj->mm_list); list_move_tail(&msm_obj->mm_list, &gpu->active_list);
list_add_tail(&msm_obj->mm_list, &gpu->active_list);
mutex_unlock(&priv->mm_lock); mutex_unlock(&priv->mm_lock);
} }
} }