]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Aug 2017 21:58:32 +0000 (14:58 -0700)
commitbc8931da557fa32c13c9512d0eb54c62fb0d5a12
tree3e5169e96f6ef674975c0d54a62589a2b5f3d06f
parent18f2b67393ae3bfd7816d47a473eb29adc6b36c6
net/mlx4_core: Make explicit conversion to 64bit value

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: 19517a24066d ("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>
drivers/net/ethernet/mellanox/mlx4/fw.c