diff options
author | Slava Shwartsman <slavash@mellanox.com> | 2016-12-29 18:37:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-29 14:17:40 -0500 |
commit | 61b6034c6cfdcb265bb453505c3d688e7567727a (patch) | |
tree | c85c3a5f272ea394e7e507d5bd77c8a83f0186bb /block/partitions | |
parent | c1d5f8ff80ea84768f5fae1ca9d1abfbb5e6bbaa (diff) |
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 'block/partitions')
0 files changed, 0 insertions, 0 deletions