[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210609070921.1330407-1-libaokun1@huawei.com>
Date: Wed, 9 Jun 2021 15:09:21 +0800
From: Baokun Li <libaokun1@...wei.com>
To: <linux-kernel@...r.kernel.org>,
Simon Horman <simon.horman@...igine.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
CC: <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
<yangjihong1@...wei.com>, <yukuai3@...wei.com>,
<libaokun1@...wei.com>, <oss-drivers@...igine.com>,
<netdev@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
Hulk Robot <hulkci@...wei.com>
Subject: [PATCH net-next v2] nfp: use list_move instead of list_del/list_add in nfp_cppcore.c
Using list_move() instead of list_del() + list_add() in nfp_cppcore.c.
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Baokun Li <libaokun1@...wei.com>
---
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);
}
Powered by blists - more mailing lists