lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250715191143.1023512-16-rrichter@amd.com>
Date: Tue, 15 Jul 2025 21:11:38 +0200
From: Robert Richter <rrichter@....com>
To: Alison Schofield <alison.schofield@...el.com>, Vishal Verma
	<vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>, Dan Williams
	<dan.j.williams@...el.com>, Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Dave Jiang <dave.jiang@...el.com>, Davidlohr Bueso <dave@...olabs.net>
CC: <linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Gregory Price
	<gourry@...rry.net>, "Fabio M. De Francesco"
	<fabio.m.de.francesco@...ux.intel.com>, Terry Bowman <terry.bowman@....com>,
	Robert Richter <rrichter@....com>
Subject: [PATCH v1 15/20] cxl/region: Prepare removal of @cxled argument from construct_region()

The @cxled function argument will be removed. Rework all error
messages and use the root decoder as reference device.

Signed-off-by: Robert Richter <rrichter@....com>
---
 drivers/cxl/core/region.c | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)

diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 9adec670432a..81ff9956a128 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -3393,7 +3393,7 @@ static struct cxl_region *create_region(struct cxl_root_decoder *cxlrd,
 static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd,
 					   struct cxl_endpoint_decoder *cxled)
 {
-	struct cxl_memdev *cxlmd = cxled_to_memdev(cxled);
+	struct device *cxlrd_dev = &cxlrd->cxlsd.cxld.dev;
 	struct range *hpa = &cxled->cxld.hpa_range;
 	struct cxl_region_params *p;
 	struct resource *res;
@@ -3407,10 +3407,9 @@ static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd,
 
 	cxlr = devm_cxl_add_region(cxlr, -1);
 	if (IS_ERR(cxlr)) {
-		dev_err(cxlmd->dev.parent,
-			"%s:%s: %s failed to add region: %ld\n",
-			dev_name(&cxlmd->dev), dev_name(&cxled->cxld.dev),
-			__func__, PTR_ERR(cxlr));
+		dev_err(cxlrd_dev->parent,
+			"%s: %s failed to add region: %ld\n",
+			dev_name(cxlrd_dev), __func__, PTR_ERR(cxlr));
 		return cxlr;
 	}
 
@@ -3418,10 +3417,8 @@ static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd,
 
 	p = &cxlr->params;
 	if (p->state >= CXL_CONFIG_INTERLEAVE_ACTIVE) {
-		dev_err(cxlmd->dev.parent,
-			"%s:%s: %s autodiscovery interrupted\n",
-			dev_name(&cxlmd->dev), dev_name(&cxled->cxld.dev),
-			__func__);
+		dev_err(cxlr->dev.parent, "%s: %s autodiscovery interrupted\n",
+			dev_name(&cxlr->dev), __func__);
 		return ERR_PTR(-EBUSY);
 	}
 
@@ -3439,8 +3436,9 @@ static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd,
 		 * prevent the region from functioning. Only causes cxl list showing
 		 * incorrect region size.
 		 */
-		dev_warn(cxlmd->dev.parent,
-			 "Extended linear cache calculation failed rc:%d\n", rc);
+		dev_warn(cxlr->dev.parent,
+			"%s: %s Extended linear cache calculation failed rc:%d\n",
+			dev_name(&cxlr->dev), __func__, rc);
 	}
 
 	rc = insert_resource(cxlrd->res, res);
@@ -3449,10 +3447,8 @@ static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd,
 		 * Platform-firmware may not have split resources like "System
 		 * RAM" on CXL window boundaries see cxl_region_iomem_release()
 		 */
-		dev_warn(cxlmd->dev.parent,
-			 "%s:%s: %s %s cannot insert resource\n",
-			 dev_name(&cxlmd->dev), dev_name(&cxled->cxld.dev),
-			 __func__, dev_name(&cxlr->dev));
+		dev_warn(cxlr->dev.parent, "%s: %s cannot insert resource\n",
+			dev_name(&cxlr->dev), __func__);
 	}
 
 	p->res = res;
@@ -3462,9 +3458,8 @@ static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd,
 	if (rc)
 		return ERR_PTR(rc);
 
-	dev_dbg(cxlmd->dev.parent, "%s:%s: %s %s res: %pr iw: %d ig: %d\n",
-		dev_name(&cxlmd->dev), dev_name(&cxled->cxld.dev), __func__,
-		dev_name(&cxlr->dev), p->res, p->interleave_ways,
+	dev_dbg(cxlr->dev.parent, "%s: %s res: %pr iw: %d ig: %d\n",
+		dev_name(&cxlr->dev), __func__, p->res, p->interleave_ways,
 		p->interleave_granularity);
 
 	/* Pair with cxl_find_region_by_range() in cxl_endpoint_get_region(). */
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ