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