Re: [PATCH rdma-next 05/10] RDMA/core: Introduce and use API to read port immutable data

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

 



On Wed, Jan 27, 2021 at 05:00:05PM +0200, Leon Romanovsky wrote:
> + * ib_port_immutable_read() - Read rdma port's immutable data
> + * @dev - IB device
> + * @port - port number whose immutable data to read. It starts with index 1 and
> + *         valid upto including rdma_end_port().
> + */
> +const struct ib_port_immutable*
> +ib_port_immutable_read(struct ib_device *dev, unsigned int port)
> +{
> +	WARN_ON(!rdma_is_port_valid(dev, port));
> +	return &dev->port_data[port].immutable;
> +}
> +EXPORT_SYMBOL(ib_port_immutable_read);

Why add this function and only call it in one place?

Jason



[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