RDS: RDMA: fix the ib_map_mr_sg_zbva() argument
authorSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 5 Dec 2016 00:25:43 +0000 (16:25 -0800)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 2 Jan 2017 22:02:44 +0000 (14:02 -0800)
Fixes warning: Using plain integer as NULL pointer

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
net/rds/ib_frmr.c

index d921adc62765dba0bbaec9a7489227348405082e..66b3d6228a15f9431e6c0014e0407139eb3f2936 100644 (file)
@@ -104,14 +104,15 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)
        struct rds_ib_frmr *frmr = &ibmr->u.frmr;
        struct ib_send_wr *failed_wr;
        struct ib_reg_wr reg_wr;
-       int ret;
+       int ret, off = 0;
 
        while (atomic_dec_return(&ibmr->ic->i_fastreg_wrs) <= 0) {
                atomic_inc(&ibmr->ic->i_fastreg_wrs);
                cpu_relax();
        }
 
-       ret = ib_map_mr_sg_zbva(frmr->mr, ibmr->sg, ibmr->sg_len, 0, PAGE_SIZE);
+       ret = ib_map_mr_sg_zbva(frmr->mr, ibmr->sg, ibmr->sg_len,
+                               &off, PAGE_SIZE);
        if (unlikely(ret != ibmr->sg_len))
                return ret < 0 ? ret : -EINVAL;