diff options
| author | Qianfeng Rong <rongqianfeng@vivo.com> | 2025-08-16 17:06:53 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-18 17:49:51 -0700 |
| commit | fce214586f99fe971a78ff1342cc331eecc74855 (patch) | |
| tree | f51b1b9b4bd233a8c9ff56c3c1f0a08bbf8491f0 /rust/helpers/helpers.c | |
| parent | 4490d075c2d989f3403059cbd30775ae21dbd754 (diff) | |
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: Qianfeng Rong <rongqianfeng@vivo.com>
Link: https://patch.msgid.link/20250816090659.117699-3-rongqianfeng@vivo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
