aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/cong.c
diff options
context:
space:
mode:
authorAlexander Lobakin <alobakin@dlink.ru>2020-02-17 10:36:29 +0300
committerJason Gunthorpe <jgg@mellanox.com>2020-03-04 13:11:49 -0400
commit91b74bf5310b22ac3286d8e9b5354b77f41af178 (patch)
treeaaa2fb032f43d9dd07d72a3d8d8b06203dc013ee /drivers/infiniband/hw/mlx5/cong.c
parentMerge tag 'v5.6-rc4' into rdma.git for-next (diff)
downloadlinux-dev-91b74bf5310b22ac3286d8e9b5354b77f41af178.tar.xz
linux-dev-91b74bf5310b22ac3286d8e9b5354b77f41af178.zip
IB/mlx5: Optimize u64 division on 32-bit arches
Commit f164be8c0366 ("IB/mlx5: Extend caps stage to handle VAR capabilities") introduced a straight "/" division of the u64 variable "bar_size". This was fixed with commit 685eff513183 ("IB/mlx5: Use div64_u64 for num_var_hw_entries calculation"). However, div64_u64() is redundant here as mlx5_var_table::stride_size is of type u32. Make the actual code way more optimized on 32-bit kernels using div_u64() and fix 80 chars break-through by the way. Fixes: 685eff513183 ("IB/mlx5: Use div64_u64 for num_var_hw_entries calculation") Link: https://lore.kernel.org/r/20200217073629.8051-1-alobakin@dlink.ru Signed-off-by: Alexander Lobakin <alobakin@dlink.ru> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/cong.c')
0 files changed, 0 insertions, 0 deletions