diff options
author | Baokun Li <libaokun1@huawei.com> | 2021-06-09 10:09:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-09 23:55:37 +0300 |
commit | 39c3783ec062231b6befc193742161af33e17d88 (patch) | |
tree | d0204ea251f4d06fbb7815d75c3057a0911f3e16 /drivers/net/ethernet/netronome | |
parent | db67f2493431c32935e5b239175df4b0b9cf0171 (diff) | |
download | linux-39c3783ec062231b6befc193742161af33e17d88.tar.xz |
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')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 3 |
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); } |