Commit 39c3783e authored by Baokun Li's avatar Baokun Li Committed by David S. Miller
Browse files

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent db67f249
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
}