diff options
author | Roland Dreier <roland@purestorage.com> | 2014-05-28 12:23:03 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-05-28 12:23:03 -0400 |
commit | 6c9b5d9b00ed2b1cbd5e5d2c176bf88da7beb224 (patch) | |
tree | a537dbc773a29d4312b4c0a26fa98f7fafce09ac | |
parent | 43bc889380c2ad9aa230eccc03a15cc52cf710d4 (diff) |
IB/mlx5: Fix warning about cast of wr_id back to pointer on 32 bits
We need to cast wr_id to unsigned long before casting to a pointer.
This fixes:
drivers/infiniband/hw/mlx5/mr.c: In function 'mlx5_umr_cq_handler':
>> drivers/infiniband/hw/mlx5/mr.c:724:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
context = (struct mlx5_ib_umr_context *)wc.wr_id;
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | drivers/infiniband/hw/mlx5/mr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 14ee4fdcf172..afa873bd028e 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c | |||
@@ -721,7 +721,7 @@ void mlx5_umr_cq_handler(struct ib_cq *cq, void *cq_context) | |||
721 | if (err == 0) | 721 | if (err == 0) |
722 | break; | 722 | break; |
723 | 723 | ||
724 | context = (struct mlx5_ib_umr_context *)wc.wr_id; | 724 | context = (struct mlx5_ib_umr_context *) (unsigned long) wc.wr_id; |
725 | context->status = wc.status; | 725 | context->status = wc.status; |
726 | complete(&context->done); | 726 | complete(&context->done); |
727 | } | 727 | } |