Commit 0dff463a authored by Zhu Yanjun's avatar Zhu Yanjun Committed by Doug Ledford

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: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 10c47d56
......@@ -291,7 +291,7 @@ static int rxe_init(struct rxe_dev *rxe)
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)
......
......@@ -92,7 +92,7 @@ static inline u32 rxe_crc32(struct rxe_dev *rxe,
return retval;
}
int rxe_set_mtu(struct rxe_dev *rxe, unsigned int dev_mtu);
void rxe_set_mtu(struct rxe_dev *rxe, unsigned int dev_mtu);
int rxe_add(struct rxe_dev *rxe, unsigned int mtu);
void rxe_remove(struct rxe_dev *rxe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment