Skip to content
Commit 8b6b82ad authored by Michal Kubecek's avatar Michal Kubecek Committed by David S. Miller
Browse files

mlx5: avoid 64-bit division in dr_icm_pool_mr_create()



Recently added code introduces 64-bit division in dr_icm_pool_mr_create()
so that build on 32-bit architectures fails with

  ERROR: "__umoddi3" [drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko] undefined!

As the divisor is always a power of 2, we can use bitwise operation
instead.

Fixes: 29cf8feb ("net/mlx5: DR, ICM pool memory allocator")
Reported-by: default avatarBorislav Petkov <bp@alien8.de>
Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e95584a8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment