net/mlx4_core: Make explicit conversion to 64bit value
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 28 Aug 2017 13:38:21 +0000 (16:38 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 26 Nov 2017 13:51:05 +0000 (13:51 +0000)
commit48dc5149694b5d77d730d6a07e28488883f61500
tree730011ae2c36213eeb0bb9239fff11b18af5549c
parentff408ba4cd682a3844fd833c0281a68fec6239b3
net/mlx4_core: Make explicit conversion to 64bit value

commit 187782eb58a89ea030731114c6ae37842a4472fe upstream.

The "lg" variable is declared as int so in all places where this variable
is used as a shift operand, the output will be int too.

This produces the following smatch warning:
drivers/net/ethernet/mellanox/mlx4/fw.c:1532 mlx4_map_cmd() warn:
should '1 << lg' be a 64 bit type?

Simple declaration of "1" to be "1ULL" will fix the issue.

Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/mellanox/mlx4/fw.c