From patchwork Tue Jul 19 12:01:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: weiyj_lk@163.com X-Patchwork-Id: 9237627 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 833186075D for ; Tue, 19 Jul 2016 14:30:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7410327569 for ; Tue, 19 Jul 2016 14:30:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 686FC2766D; Tue, 19 Jul 2016 14:30:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00DBD27569 for ; Tue, 19 Jul 2016 14:30:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DB23D6E247; Tue, 19 Jul 2016 14:30:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from m12-15.163.com (m12-15.163.com [220.181.12.15]) by gabe.freedesktop.org (Postfix) with ESMTP id AF1E46E2FC for ; Tue, 19 Jul 2016 12:02:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=lGh13 jnsNjsJjXfGQSb+dnH3fUjo9GZ1aMt5oOympZo=; b=JE/Haaw08eO1R8TCaGskj rBxc0QskTY/k8V7cO+ujA4ufucz4W7sOIN8iH98Ggj8PsUE7cG8alsgU0KuYOJ/V SNbzFnV8mnn1sxshX71w8xFGzB7Qmph8z0z4wd/J1NabuLN+p3aMQ77Cq9mfWY8P AHYTJ1Ks6DNsIvXu+rlgQs= Received: from localhost.localdomain.localdomain (unknown [180.110.255.208]) by smtp11 (Coremail) with SMTP id D8CowAC32_qyFo5X+A6KAQ--.48006S2; Tue, 19 Jul 2016 20:01:54 +0800 (CST) From: Wei Yongjun To: Alex Deucher , christian.koenig@amd.com, airlied@linux.ie, David1.Zhou@amd.com, Jammy.Zhou@amd.com, Monk.Liu@amd.com Subject: [PATCH -next] drm/amdgpu: use list_move instead of list_del/list_add Date: Tue, 19 Jul 2016 12:01:54 +0000 Message-Id: <1468929714-8736-1-git-send-email-weiyj_lk@163.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CM-TRANSID: D8CowAC32_qyFo5X+A6KAQ--.48006S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Wr4kWw43trWUJrWfKryDKFg_yoW3tFc_CF WrJr1DXr13uF9FgF12vr4fZ3sFyFy3ZF4kGr1SqF93tr9rZ34jvayDArWSqr15urs7GF9r Xw1qgF15C3ZxGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnPxhPUUUUU== X-Originating-IP: [180.110.255.208] X-CM-SenderInfo: pzhl5yxbonqiywtou0bp/xtbBDQOr1laDoIKktQABsU X-Mailman-Approved-At: Tue, 19 Jul 2016 14:30:31 +0000 Cc: Wei Yongjun , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun --- 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); }