diff options
author | Robert Richter <rrichter@amd.com> | 2025-05-09 17:06:53 +0200 |
---|---|---|
committer | Dave Jiang <dave.jiang@intel.com> | 2025-05-09 09:48:26 -0700 |
commit | 74bf125abd87297b559eb72043e4677550d3a790 (patch) | |
tree | 0ee9cf128289cecd5c6c7d291d7dd72d6fa7b94d | |
parent | 5ed826fc4bc6073e0083ed30c10f6a54da06b83b (diff) |
cxl/port: Replace put_cxl_root() by a cleanup helper
Function put_cxl_root() is only used by its cleanup helper. Remove the
function entirely and only use the helper.
Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Gregory Price <gourry@gourry.net>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: "Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20250509150700.2817697-9-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
-rw-r--r-- | drivers/cxl/core/port.c | 9 | ||||
-rw-r--r-- | drivers/cxl/cxl.h | 4 |
2 files changed, 2 insertions, 11 deletions
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c index 83cfebe8d3e9..eb46c6764d20 100644 --- a/drivers/cxl/core/port.c +++ b/drivers/cxl/core/port.c @@ -1037,15 +1037,6 @@ struct cxl_root *find_cxl_root(struct cxl_port *port) } EXPORT_SYMBOL_NS_GPL(find_cxl_root, "CXL"); -void put_cxl_root(struct cxl_root *cxl_root) -{ - if (!cxl_root) - return; - - put_device(&cxl_root->port.dev); -} -EXPORT_SYMBOL_NS_GPL(put_cxl_root, "CXL"); - static struct cxl_dport *find_dport(struct cxl_port *port, int id) { struct cxl_dport *dport; diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 3266be2fe5ea..c3f50f2d5933 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -737,10 +737,10 @@ struct cxl_port *devm_cxl_add_port(struct device *host, struct cxl_root *devm_cxl_add_root(struct device *host, const struct cxl_root_ops *ops); struct cxl_root *find_cxl_root(struct cxl_port *port); -void put_cxl_root(struct cxl_root *cxl_root); -DEFINE_FREE(put_cxl_root, struct cxl_root *, if (_T) put_cxl_root(_T)) +DEFINE_FREE(put_cxl_root, struct cxl_root *, if (_T) put_device(&_T->port.dev)) DEFINE_FREE(put_cxl_port, struct cxl_port *, if (!IS_ERR_OR_NULL(_T)) put_device(&_T->dev)) + int devm_cxl_enumerate_ports(struct cxl_memdev *cxlmd); void cxl_bus_rescan(void); void cxl_bus_drain(void); |