Skip to content

Commit

Permalink
nfp: use list_move instead of list_del/list_add in nfp_cppcore.c
Browse files Browse the repository at this point in the history
Using list_move() instead of list_del() + list_add() in nfp_cppcore.c.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Baokun Li <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
LiBaokun96 authored and davem330 committed Jun 9, 2021
1 parent db67f24 commit 39c3783
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 39c3783

Please sign in to comment.