Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4969701pxj; Wed, 9 Jun 2021 06:25:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2utmUfc9wTcnV2E2EnLHmFL7tEn4erYaenE/S5ZiX5K+Vlg2qNm1nS1qjE8d+kQF69n+P X-Received: by 2002:a17:906:b2d1:: with SMTP id cf17mr29068176ejb.225.1623245118340; Wed, 09 Jun 2021 06:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623245118; cv=none; d=google.com; s=arc-20160816; b=WB1jlcsPClKzPcfA527BTf8e4VfFhmze3NI12qrRzYiwb7OU+QhDbThbQEDnaTLFXM JxFPPL5UNDf3arN6+WTnPP5J3zpmAFsBEPF9hDt+gyCs06jSnUMBuC9AjkGujem/XgBN c621yIR1+vAYn21BDS2Az3XP5LsI40kXyVhTxa+V2iVYTvL3RHp7ABTb4CAV9VEC7zXg HDbkRrO6paV7Mw3tLm2gLr/erqLk5/iioSWOdewz6VKnsatBWXEoRn6jFL1/EEN3Otec S0nAo8loQFCz4P0FqDDAhpf4z6YrZ94LdIs2BZ/whURb3BVUerl96onOqCKVNwf76Rdy rBpQ== 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=CuM6UW8OsaNmPWqlnLk81fKISSaoHjOCQdLpjGjFuWc=; b=Usgph6ETFn/E9v4UMfD0l+yZiIwmCqv2Cn10UHTMFbn0yKQh/I4UDaAe0PyBoch7Z0 kmqY7Qps9DXvgMTQYJh7cFIFDyz7cWgssdmJ712X9NTBEO4qBBDL5Dn2P+/Fnbwhh8/6 4x6qt2O8LCEpLnNljJHeVPIJdnogI2bd97FPxW68a+MUmSsRhYDC8RGv9aHaJK7cxgOE dBVTPP++y6UoSopSDC49uqxgYjaTuTNWee91DWRZiDPEPmySR63slijDN3Cx14PmPDQn 7ACKuX64EyOqhy12Bp8F/nCIChu6fioMoWMi0uUpdXYqFGm7z9zWdIgYeePFW16HEt3G 183g== 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 b19si2435996ejl.537.2021.06.09.06.24.54; Wed, 09 Jun 2021 06:25:18 -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 S236820AbhFIHCK (ORCPT + 99 others); Wed, 9 Jun 2021 03:02:10 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:5301 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236781AbhFIHCI (ORCPT ); Wed, 9 Jun 2021 03:02:08 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4G0HtJ5r13z1455X; Wed, 9 Jun 2021 14:55:20 +0800 (CST) Received: from dggpeml500020.china.huawei.com (7.185.36.88) by dggemv711-chm.china.huawei.com (10.1.198.66) 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:12 +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:11 +0800 From: Baokun Li To: , Simon Horman , "David S. Miller" , Jakub Kicinski CC: , , , , , , , , Hulk Robot Subject: [PATCH net-next v2] nfp: use list_move instead of list_del/list_add in nfp_cppcore.c Date: Wed, 9 Jun 2021 15:09:21 +0800 Message-ID: <20210609070921.1330407-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: dggems701-chm.china.huawei.com (10.3.19.178) 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 nfp_cppcore.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li --- V1->V2: CC mailist .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c index 94994a939277..d7ac0307797f 100644 --- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c +++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c @@ -905,8 +905,7 @@ area_cache_put(struct nfp_cpp *cpp, struct nfp_cpp_area_cache *cache) return; /* Move to front of LRU */ - list_del(&cache->entry); - list_add(&cache->entry, &cpp->area_cache_list); + list_move(&cache->entry, &cpp->area_cache_list); mutex_unlock(&cpp->area_cache_mutex); }