Re: [PATCH v4 13/23] cxl/hdm: Use stored Component Register mappings to map HDM decoder capability

Robert Richter
2023-05-24T09:49:36Z

On 24.05.23 09:12:24, kernel test robot wrote:

> >> drivers/cxl/core/hdm.c:128:26: warning: no previous prototype for 'cxl_port_get_comp_map' [-Wmissing-prototypes]
> 128 | struct cxl_register_map *cxl_port_get_comp_map(struct cxl_port *port)
> | ^~~~~~~~~~~~~~~~~~~~~
>
>
> vim +/cxl_port_get_comp_map +128 drivers/cxl/core/hdm.c
>
> 127
> > 128 struct cxl_register_map *cxl_port_get_comp_map(struct cxl_port *port)

This should have been 'static' and also solves the warning then. Will
change.

-Robert

> 129 {
> 130 /*
> 131 * HDM capability applies to Endpoints, USPs and VH Host
> 132 * Bridges. The Endpoint's component register mappings are
> 133 * located in the cxlds.
> 134 */
> 135 if (is_cxl_endpoint(port)) {
> 136 struct cxl_memdev *memdev = to_cxl_memdev(port->uport);
> 137
> 138 return &memdev->cxlds->comp_map;
> 139 }
> 140
> 141 return &port->comp_map;
> 142 }
> 143