aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSlava Shwartsman <slavash@mellanox.com>2016-12-29 18:37:12 +0200
committerDavid S. Miller <davem@davemloft.net>2016-12-29 14:17:40 -0500
commit61b6034c6cfdcb265bb453505c3d688e7567727a (patch)
treec85c3a5f272ea394e7e507d5bd77c8a83f0186bb /include
parentnet/mlx4: Remove BUG_ON from ICM allocation routine (diff)
downloadlinux-dev-61b6034c6cfdcb265bb453505c3d688e7567727a.tar.xz
linux-dev-61b6034c6cfdcb265bb453505c3d688e7567727a.zip
net/mlx4_en: Fix type mismatch for 32-bit systems
is_power_of_2 expects unsigned long and we pass u64 max_val_cycles, this will be truncated on 32 bit systems, and the result is not what we were expecting. div_u64 expects u32 as a second argument and we pass max_val_cycles_rounded which is u64 hence it will always be truncated. Fix was tested on both 64 and 32 bit systems and got same results for max_val_cycles and max_val_cycles_rounded. Fixes: 4850cf458157 ("net/mlx4_en: Resolve dividing by zero in 32-bit system") Signed-off-by: Slava Shwartsman <slavash@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions