Re: [PATCH v14 18/34] cxl/port: Remove "enumerate dports" helpers

From: Dave Jiang

Date: Wed Jan 14 2026 - 16:24:35 EST




On 1/14/26 11:20 AM, Terry Bowman wrote:
> From: Dan Williams <dan.j.williams@xxxxxxxxx>
>
> Now that cxl_switch_port_probe() no longer walks potential dports, because
> they are enumerated dynamically on descendant endpoint arrival, remove the
> dead code.
>
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> Reviewed-by: Terry Bowman <terry.bowman@xxxxxxx>

Missing your sign off tag


>
> ---
>
> Changes in v13 -> v14:
> - New patch
> ---
> drivers/cxl/core/pci.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
> index b838c59d7a3c..0305a421504e 100644
> --- a/drivers/cxl/core/pci.c
> +++ b/drivers/cxl/core/pci.c
> @@ -71,6 +71,14 @@ struct cxl_dport *__devm_cxl_add_dport_by_dev(struct cxl_port *port,
> }
> EXPORT_SYMBOL_NS_GPL(__devm_cxl_add_dport_by_dev, "CXL");
>
> +struct cxl_walk_context {
> + struct pci_bus *bus;
> + struct cxl_port *port;
> + int type;
> + int error;
> + int count;
> +};
> +
> static int cxl_dvsec_mem_range_valid(struct cxl_dev_state *cxlds, int id)
> {
> struct pci_dev *pdev = to_pci_dev(cxlds->dev);
> @@ -820,14 +828,6 @@ int cxl_gpf_port_setup(struct cxl_dport *dport)
> return 0;
> }
>
> -struct cxl_walk_context {
> - struct pci_bus *bus;
> - struct cxl_port *port;
> - int type;
> - int error;
> - int count;
> -};
> -
> static int count_dports(struct pci_dev *pdev, void *data)
> {
> struct cxl_walk_context *ctx = data;