diff options
author | Dave Jiang <dave.jiang@intel.com> | 2024-01-06 01:07:40 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2024-01-06 01:36:29 +0300 |
commit | 44cd71ef7bacdfcf7c3e8a7b13f11a7eba69533d (patch) | |
tree | c7d195c0a28201dc4be971746a848115a95c58d0 /drivers/cxl/port.c | |
parent | 98856b2ea3065d8f60e90f423d7707f4a4706ec5 (diff) | |
download | linux-44cd71ef7bacdfcf7c3e8a7b13f11a7eba69533d.tar.xz |
cxl: Convert find_cxl_root() to return a 'struct cxl_root *'
Commit 790815902ec6 ("cxl: Add support for _DSM Function for retrieving QTG ID")
introduced 'struct cxl_root', however all usages have been worked
indirectly through cxl_port. Refactor code such as find_cxl_root()
function to use 'struct cxl_root' directly.
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/170449246044.3779673.13035770941393418591.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/port.c')
-rw-r--r-- | drivers/cxl/port.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cxl/port.c b/drivers/cxl/port.c index da3c3a08bd62..4f3a08fdc9e9 100644 --- a/drivers/cxl/port.c +++ b/drivers/cxl/port.c @@ -94,6 +94,7 @@ static int cxl_endpoint_port_probe(struct cxl_port *port) struct cxl_endpoint_dvsec_info info = { .port = port }; struct cxl_memdev *cxlmd = to_cxl_memdev(port->uport_dev); struct cxl_dev_state *cxlds = cxlmd->cxlds; + struct cxl_root *cxl_root; struct cxl_hdm *cxlhdm; struct cxl_port *root; int rc; @@ -130,7 +131,8 @@ static int cxl_endpoint_port_probe(struct cxl_port *port) * This can't fail in practice as CXL root exit unregisters all * descendant ports and that in turn synchronizes with cxl_port_probe() */ - root = find_cxl_root(port); + cxl_root = find_cxl_root(port); + root = &cxl_root->port; /* * Now that all endpoint decoders are successfully enumerated, try to |