Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4969899pxj; Wed, 9 Jun 2021 06:25:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDwzzGsuB2+GJ84sz5R9G369Yu73MYNd+GdncGilr9+/2BB82l+feDo87g5xZb2ZINM8/x X-Received: by 2002:a17:906:4e81:: with SMTP id v1mr28318377eju.125.1623245134249; Wed, 09 Jun 2021 06:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623245134; cv=none; d=google.com; s=arc-20160816; b=AZvqsyC7Mzdbar+txNT6A6Hn4PgEI9LKJzSJRGvbW354QWWO+I9YNIh8Ye7UagzGwl 7ZQxQQOvBO30kW/IyhEX1rMJfGGeLbmzwWkQrHGrK7zfEMoLCflKQnMutUXICSsR5+9J 2BoJPsGGfY+iNfMDl5OSkN1SvoRX31bf/UHPbBfhmyU9yRIhwKjHjonJe2pv/3BjcP3q 8yIzZtD1fJDafeb5XDq/nWXmTXDGi4AOyRjjNQd21O7bDBpsfSFiAd6tfRYQ873xKMKQ bSOs1Bufm4+nsXG+nQBH5hdIS/DgwIVMhkoQ+nJJ+/siA+COwDF7C0G018ksA9NG2+sq 235A== 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=bY/f/sed3E+SBmso/4q2DuNE7gCni1cQ37ZXxYJx8Z0=; b=R30nZhWjK469TeqERa92d6u1TVhGiKJ62Pi26UTODI7Ue7Q8lQ0hTooEqjNGoNlzHS 6XK+a6C6yk2woHijmYUrmewniZC8v5/fh4ES0kKtL3Oq7hhZqY46og+GPx1Pl1JQ4cze Ys9GApZlCCb+YVkRShkxEWwot8jBZNkQemcLRZSo8Mi6CxbY2V0n+bUGZ5FJtpC6l2BT bZcjPYWgPtqKD1Z1uRXQhDjq0fCZqz3kXtDlqamqeBywoFnWM14KpA+SjJsrxRNLobaG Op+27hYQPHTqCkomJ+XBYvL+RHPYy0puUr5I5hzsBJP/AmWo1J9AcxEBgsX0/5rQJEhr 6pSQ== 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 f23si2280914ejj.287.2021.06.09.06.25.10; Wed, 09 Jun 2021 06:25:34 -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 S236928AbhFIHC5 (ORCPT + 99 others); Wed, 9 Jun 2021 03:02:57 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:5345 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234196AbhFIHC4 (ORCPT ); Wed, 9 Jun 2021 03:02:56 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4G0HwP1Cn8z6vkS; Wed, 9 Jun 2021 14:57:09 +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:00:52 +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:00:51 +0800 From: Baokun Li To: , Ben Skeggs , "David Airlie" , Daniel Vetter , Lyude Paul CC: , , , , , , , , Hulk Robot Subject: [PATCH -next v2] drm/nouveau/gr: use list_move instead of list_del/list_add in nv40.c Date: Wed, 9 Jun 2021 15:10:00 +0800 Message-ID: <20210609071000.1330837-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: dggems704-chm.china.huawei.com (10.3.19.181) 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() instead of list_del() + list_add() in nv40.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li --- V1->V2: CC mailist drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c index 67f3535ff97e..c65ca839e4de 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c @@ -252,8 +252,7 @@ nv40_gr_intr(struct nvkm_gr *base) list_for_each_entry(temp, &gr->chan, head) { if (temp->inst >> 4 == inst) { chan = temp; - list_del(&chan->head); - list_add(&chan->head, &gr->chan); + list_move(&chan->head, &gr->chan); break; } }