Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4975312pxj; Wed, 9 Jun 2021 06:32:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOna2e5WT98bdIBG+kZt5Q+jnTw2haWjia8FLfMNDE8gyv+Tpxc5abDJxaGXQh4meR96Dw X-Received: by 2002:a17:906:d1d1:: with SMTP id bs17mr28707808ejb.492.1623245544405; Wed, 09 Jun 2021 06:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623245544; cv=none; d=google.com; s=arc-20160816; b=GoqE/nBLyDp92w7V2CrAOrDtO9HCS30wcbPbJxsqsQOhum5jLUfIlHhWzImOvWnrmx KN5BJqlgnnMaUz+HkvnYLaAnnDImNuW9Bmxh/omhQlpbbkBGySmc4dzeruoK+tqfP4WY ce50NtCJ3MvZomRadY+d8tAYBkwl09CuWDqY9iFI8Rmv+2ZpLg4cMQg6cBekaoVOvWMu vYdo78Ryi/3hQ4jIJd12NjxsksP4wpgX+Oig9F+RrQYWUuAOaq7m58i2Q8kG1hzFO2zh Tb4R7AAUUfKObIkruZK6Rtw1MW/SGc/0REpJ1abOjui7O2puL5IAxAzcvdqPGMX0FkG1 Q3SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=/FpXWdVa280zwQJGsGVDJQ5JDIf+ANmsWUl7inw06W4=; b=XStL74L8euBVz2AQoLkfdJnW6yCqBJ3o+kI2KQ6TXHXVlES3VPcngy3+4APcxVP/oT LHjIW9vUBkBgWlfqwi9V1lhnQju8gxxRPH03ypUMdFYhpfir271n0jWHugovFiPKGeaK zv6TFbl2WUbse0JYZo3JHmL170Y/Cyhw9ZRzRIJJWfL8jLzsKQzYnLX7PUJs2usGAa26 tNZRNgeLY1WAwl6ZnT28PGanz23Cc98RkvOhWYboowmmSFHK7OPiCWJqOSACGwl/tOYX XY2qyB58SJGOzn40TSnIlNmYy7oGEtKDwC3/3LOvDNDSg6YrKitNG3ZG7LXgLDvcHHSl z9ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si2460990ejl.253.2021.06.09.06.32.00; Wed, 09 Jun 2021 06:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237126AbhFIHPn (ORCPT + 99 others); Wed, 9 Jun 2021 03:15:43 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:5463 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232746AbhFIHPl (ORCPT ); Wed, 9 Jun 2021 03:15:41 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G0JDJ0bJnzZdsn; Wed, 9 Jun 2021 15:10:56 +0800 (CST) Received: from dggpeml500020.china.huawei.com (7.185.36.88) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 9 Jun 2021 15:13:40 +0800 Received: from huawei.com (10.175.127.227) by dggpeml500020.china.huawei.com (7.185.36.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 9 Jun 2021 15:13:39 +0800 From: Baokun Li To: , VMware Graphics , Roland Scheidegger , Zack Rusin , David Airlie , Daniel Vetter CC: , , , , , , , "Hulk Robot" Subject: [PATCH -next v2] drm/vmwgfx: Use list_move_tail instead of list_del/list_add_tail in vmwgfx_cmdbuf_res.c Date: Wed, 9 Jun 2021 15:22:48 +0800 Message-ID: <20210609072248.1353421-1-libaokun1@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500020.china.huawei.com (7.185.36.88) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using list_move_tail() instead of list_del() + list_add_tail() in vmwgfx_cmdbuf_res.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li --- V1->V2: CC mailist drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c index b262d61d839d..6aebe7d933cc 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c @@ -167,8 +167,7 @@ void vmw_cmdbuf_res_revert(struct list_head *list) break; case VMW_CMDBUF_RES_DEL: drm_ht_insert_item(&entry->man->resources, &entry->hash); - list_del(&entry->head); - list_add_tail(&entry->head, &entry->man->list); + list_move_tail(&entry->head, &entry->man->list); entry->state = VMW_CMDBUF_RES_COMMITTED; break; default: