RDMA/cxgb4: Fix gcc warning on 32-bit arch
authorPaul Bolle <pebolle@tiscali.nl>
Thu, 9 Jan 2014 10:53:27 +0000 (11:53 +0100)
committerRoland Dreier <roland@purestorage.com>
Thu, 23 Jan 2014 07:07:09 +0000 (23:07 -0800)
Building mem.o for 32 bits x86 triggers a GCC warning:

    drivers/infiniband/hw/cxgb4/mem.c: In function '_c4iw_write_mem_dma_aligned':
    drivers/infiniband/hw/cxgb4/mem.c:79:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Silence that warning by casting "&wr_wait" to unsigned long before
casting it to __be64.  That's what _c4iw_write_mem_inline() already does.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/mem.c

index 84e45006451cd3983cd1b28bfb22d2c0a9c02ef7..41b11951a30ab71925d915d582cbabf0578888c9 100644 (file)
@@ -76,7 +76,7 @@ static int _c4iw_write_mem_dma_aligned(struct c4iw_rdev *rdev, u32 addr,
        INIT_ULPTX_WR(req, wr_len, 0, 0);
        req->wr.wr_hi = cpu_to_be32(FW_WR_OP(FW_ULPTX_WR) |
                        (wait ? FW_WR_COMPL(1) : 0));
-       req->wr.wr_lo = wait ? (__force __be64)&wr_wait : 0;
+       req->wr.wr_lo = wait ? (__force __be64)(unsigned long) &wr_wait : 0L;
        req->wr.wr_mid = cpu_to_be32(FW_WR_LEN16(DIV_ROUND_UP(wr_len, 16)));
        req->cmd = cpu_to_be32(ULPTX_CMD(ULP_TX_MEM_WRITE));
        req->cmd |= cpu_to_be32(V_T5_ULP_MEMIO_ORDER(1));