summaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw/rxe/rxe.c
diff options
context:
space:
mode:
authorZhu Yanjun <yanjun.zhu@oracle.com>2018-04-20 17:30:54 +0300
committerDoug Ledford <dledford@redhat.com>2018-04-27 19:18:29 +0300
commit0dff463a6a867072f2c779e2fed651b498901801 (patch)
tree6b59870d185000e458ee2dbdfe36709ad98f5876 /drivers/infiniband/sw/rxe/rxe.c
parent10c47d560603a8ba9d74889028cf6728a2d845ca (diff)
downloadlinux-0dff463a6a867072f2c779e2fed651b498901801.tar.xz
IB/rxe: change rxe_set_mtu function type to void
The function rxe_set_mtu always returns zero. So this function type is changed 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: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 4d1d96805ca5..7121e1b1eb89 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -291,7 +291,7 @@ err1:
return err;
}
-int rxe_set_mtu(struct rxe_dev *rxe, unsigned int ndev_mtu)
+void rxe_set_mtu(struct rxe_dev *rxe, unsigned int ndev_mtu)
{
struct rxe_port *port = &rxe->port;
enum ib_mtu mtu;
@@ -303,8 +303,6 @@ int rxe_set_mtu(struct rxe_dev *rxe, unsigned int ndev_mtu)
port->attr.active_mtu = mtu;
port->mtu_cap = ib_mtu_enum_to_int(mtu);
-
- return 0;
}
/* called by ifc layer to create new rxe device.
@@ -320,9 +318,7 @@ int rxe_add(struct rxe_dev *rxe, unsigned int mtu)
if (err)
goto err1;
- err = rxe_set_mtu(rxe, mtu);
- if (err)
- goto err1;
+ rxe_set_mtu(rxe, mtu);
err = rxe_register_device(rxe);
if (err)