linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/amdgpu: use list_move instead of list_del/list_add
@ 2016-07-19 12:01 Wei Yongjun
  2016-07-19 12:08 ` Christian König
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-07-19 12:01 UTC (permalink / raw)
  To: Alex Deucher, christian.koenig, airlied, David1.Zhou, Jammy.Zhou,
	Monk.Liu
  Cc: Wei Yongjun, dri-devel, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Using list_move() instead of list_del() + list_add().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 0307ff5..aba38ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -414,8 +414,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
 
 			if (e->robj->tbo.ttm->state != tt_bound &&
 			    !e->user_pages) {
-				list_del(&e->tv.head);
-				list_add(&e->tv.head, &need_pages);
+				list_move(&e->tv.head, &need_pages);
 
 				amdgpu_bo_unreserve(e->robj);
 			}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] drm/amdgpu: use list_move instead of list_del/list_add
  2016-07-19 12:01 [PATCH -next] drm/amdgpu: use list_move instead of list_del/list_add Wei Yongjun
@ 2016-07-19 12:08 ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2016-07-19 12:08 UTC (permalink / raw)
  To: Wei Yongjun, Alex Deucher, airlied, David1.Zhou, Jammy.Zhou,
	Monk.Liu
  Cc: Wei Yongjun, dri-devel, linux-kernel

Am 19.07.2016 um 14:01 schrieb Wei Yongjun:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Using list_move() instead of list_del() + list_add().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 0307ff5..aba38ec 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -414,8 +414,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
>   
>   			if (e->robj->tbo.ttm->state != tt_bound &&
>   			    !e->user_pages) {
> -				list_del(&e->tv.head);
> -				list_add(&e->tv.head, &need_pages);
> +				list_move(&e->tv.head, &need_pages);
>   
>   				amdgpu_bo_unreserve(e->robj);
>   			}
>
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-19 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19 12:01 [PATCH -next] drm/amdgpu: use list_move instead of list_del/list_add Wei Yongjun
2016-07-19 12:08 ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).