aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome/nfp/nfpcore
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2021-06-09 15:09:21 +0800
committerDavid S. Miller <davem@davemloft.net>2021-06-09 13:55:37 -0700
commit39c3783ec062231b6befc193742161af33e17d88 (patch)
treed0204ea251f4d06fbb7815d75c3057a0911f3e16 /drivers/net/ethernet/netronome/nfp/nfpcore
parentnet/x25: fix a mistake in grammar (diff)
downloadlinux-dev-39c3783ec062231b6befc193742161af33e17d88.tar.xz
linux-dev-39c3783ec062231b6befc193742161af33e17d88.zip
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@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfpcore')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c3
1 files changed, 1 insertions, 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);
}