From: Baokun Li Date: Wed, 9 Jun 2021 07:09:21 +0000 (+0800) Subject: nfp: use list_move instead of list_del/list_add in nfp_cppcore.c X-Git-Tag: v5.15~843^2~265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39c3783ec062231b6befc193742161af33e17d88;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Baokun Li Reviewed-by: Simon Horman Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c index 94994a9..d7ac0307 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); }