]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4: Use ARRAY_SIZE to get an array's size
authorJason Wang <wangborong@cdjrlc.com>
Tue, 17 Aug 2021 12:11:06 +0000 (20:11 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Aug 2021 22:16:54 +0000 (15:16 -0700)
commitf4efa41c4cd91be4c1cc93dcdaaf2a72d3559658
treed2ee5a8fd748598833a44200783b1ed36a877b1b
parentd3dd449d8408b1f783d892b18b4436db8aa28d7d
net/mlx4: Use ARRAY_SIZE to get an array's size

The ARRAY_SIZE macro is defined to get an array's size which is
more compact and more formal in linux source. Thus, we can replace
the long sizeof(arr)/sizeof(arr[0]) with the compact ARRAY_SIZE.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20210817121106.44189-1-wangborong@cdjrlc.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx4/qp.c