Re: [PATCH net-next v03 3/4] hinic3: Use array_size instead of multiplying
From: Joe Damato
Date: Thu Jan 29 2026 - 15:06:56 EST
On Thu, Jan 29, 2026 at 12:01:10PM +0800, Fan Gong wrote:
> Since commit 17fcb3dc12bb ("hinic3: module initialization and tx/rx logic")
> use "size * sizeof(u64)" in hinic3_feature_nego.
> Use array_size instead of multiplying can make it clearer.
>
> Link: https://lore.kernel.org/netdev/20250911123120.GG30363@xxxxxxxxxxxxxxxx/
> Co-developed-by: Zhu Yikai <zhuyikai1@xxxxxxxxxxxxxx>
> Signed-off-by: Zhu Yikai <zhuyikai1@xxxxxxxxxxxxxx>
> Signed-off-by: Fan Gong <gongfan1@xxxxxxxxxx>
> ---
> drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
create_cmdq_wq in hinic3_cmdq.c has a memcpy that could probably benefit from
array_size, but I'm not sure.
For this change though:
Reviewed-by: Joe Damato <joe@xxxxxxx>