mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
db67f24934
commit
39c3783ec0
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue