IB/rxe: change the function to void from int
authorZhu Yanjun <yanjun.zhu@oracle.com>
Wed, 31 Jan 2018 11:06:55 +0000 (06:06 -0500)
committerDoug Ledford <dledford@redhat.com>
Wed, 31 Jan 2018 21:32:10 +0000 (16:32 -0500)
The function rxe_av_from_attr always return 0. So change the
function to void.

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_av.c
drivers/infiniband/sw/rxe/rxe_loc.h
drivers/infiniband/sw/rxe/rxe_verbs.c

index 8accd5da2c75dabeaecb8dc1a674719685587bb5..11e7bedd97f6784bacb610d2a77bd430d157d201 100644 (file)
@@ -52,14 +52,13 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr)
        return 0;
 }
 
-int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
+void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
                     struct rdma_ah_attr *attr)
 {
        memset(av, 0, sizeof(*av));
        memcpy(&av->grh, rdma_ah_read_grh(attr),
               sizeof(*rdma_ah_read_grh(attr)));
        av->port_num = port_num;
-       return 0;
 }
 
 int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
index abd8c426bb8b3e62854e914eabba39c2b41b2725..a0be6523aac05c1742ed40cb8a03d14817609e55 100644 (file)
@@ -38,7 +38,7 @@
 
 int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr);
 
-int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
+void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
                     struct rdma_ah_attr *attr);
 
 int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
index 621b0a7802d5ce41622dbbc2be84ea7c35e8715c..e15344148173e0bb41ac0fe4457aa7883abe9fbf 100644 (file)
@@ -271,9 +271,8 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr,
                return err;
        }
 
-       err = rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
-       if (!err)
-               err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
+       rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
+       err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
 
        if (sgid_attr.ndev)
                dev_put(sgid_attr.ndev);