Commit fce21458 authored by Qianfeng Rong's avatar Qianfeng Rong Committed by Jakub Kicinski
Browse files

nfp: flower: use vmalloc_array() to simplify code



Remove array_size() calls and replace vmalloc() with vmalloc_array() in
nfp_flower_metadata_init().  vmalloc_array() is also optimized better,
resulting in less instructions being used.

Place 'NFP_FL_STATS_ELEM_RS' with the sizeof() parameter as the second
argument to vmalloc_array() to avoid -Wcalloc-transposed-args compilation
warnings.

Signed-off-by: default avatarQianfeng Rong <rongqianfeng@vivo.com>
Link: https://patch.msgid.link/20250816090659.117699-3-rongqianfeng@vivo.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4490d075
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment