summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2017-08-17 15:50:42 +0300
committerDoug Ledford <dledford@redhat.com>2017-08-24 16:27:10 -0400
commit623248955d985b86cd778c63efe6a7ad03a018c4 (patch)
tree63601fc6487422c600b928b5b367cd83ce7fe2d9
parent5d50f400e56fbc7a14ef3f8d42ba47710e455881 (diff)
downloadop-kernel-dev-623248955d985b86cd778c63efe6a7ad03a018c4.zip
op-kernel-dev-623248955d985b86cd778c63efe6a7ad03a018c4.tar.gz
RDMA/mthca: 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/infiniband/hw/mthca/mthca_cmd.c:701 mthca_map_cmd() warn: should '1 << lg' be a 64 bit type? Simple declaration of "1" to be "1ULL" will fix the issue. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
index a1900d2..419a2a2 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -698,7 +698,7 @@ static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm,
for (i = 0; i < mthca_icm_size(&iter) >> lg; ++i) {
if (virt != -1) {
pages[nent * 2] = cpu_to_be64(virt);
- virt += 1 << lg;
+ virt += 1ULL << lg;
}
pages[nent * 2 + 1] =
OpenPOWER on IntegriCloud