Re: [PATCH 1/1] IB/rxe: change rxe_set_mtu function type to void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 20, 2018 at 10:30:54AM -0400, Zhu Yanjun wrote:
> The function rxe_set_mtu always returns zero. So this function type
> is changed to void.
> 
> CC: Srinivas Eeda <srinivas.eeda@xxxxxxxxxx>
> CC: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxxx>

Reviewed-by: Yuval Shaia <yuval.shaia@xxxxxxxxxx>

> ---
>  drivers/infiniband/sw/rxe/rxe.c | 8 ++------
>  drivers/infiniband/sw/rxe/rxe.h | 2 +-
>  2 files changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
> index e493fdb..59ee813 100644
> --- a/drivers/infiniband/sw/rxe/rxe.c
> +++ b/drivers/infiniband/sw/rxe/rxe.c
> @@ -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;
>  }
>  EXPORT_SYMBOL(rxe_set_mtu);
>  
> @@ -321,9 +319,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)
> diff --git a/drivers/infiniband/sw/rxe/rxe.h b/drivers/infiniband/sw/rxe/rxe.h
> index 561ad30..d831aeb 100644
> --- a/drivers/infiniband/sw/rxe/rxe.h
> +++ b/drivers/infiniband/sw/rxe/rxe.h
> @@ -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);
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux