]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: hns3: Use ARRAY_SIZE() to improve readability
authorZhang Zekun <zhangzekun11@huawei.com>
Sun, 18 Aug 2024 05:25:18 +0000 (13:25 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 20 Aug 2024 22:18:21 +0000 (15:18 -0700)
commit2cbece60a4af03803634abd1e840e513db48d42e
tree4e8c82ca53d303545061e34fdbae1b49fc4af5fc
parent555e5531635a7c5dba663d06cea240362624dfde
net: hns3: Use ARRAY_SIZE() to improve readability

There is a helper function ARRAY_SIZE() to help calculating the
u32 array size, and we don't need to do it mannually. So, let's
use ARRAY_SIZE() to calculate the array size, and improve the code
readability.

Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Reviewed-by: Jijie Shao<shaojijie@huawei.com>
Link: https://patch.msgid.link/20240818052518.45489-1-zhangzekun11@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_regs.c