All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cxl/hdm: Debug, use decoder name function
@ 2023-09-03  2:52 Ira Weiny
  0 siblings, 0 replies; only message in thread
From: Ira Weiny @ 2023-09-03  2:52 UTC (permalink / raw)
  To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
	Vishal Verma, Dan Williams
  Cc: linux-cxl, linux-kernel, Navneet Singh, Jonathan Cameron, Fan Ni,
	Ira Weiny

The decoder enum has a name conversion function defined now.

Use that instead of open coding.

Suggested-by: Navneet Singh <navneet.singh@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
Changes:
[iweiny: split out from DCD series]
https://lore.kernel.org/r/20230604-dcd-type2-upstream-v2-0-f740c47e7916@intel.com
---
 drivers/cxl/core/hdm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index 4449b34a80cc..4fa49923eac0 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -530,8 +530,7 @@ int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long long size)
 
 	if (size > avail) {
 		dev_dbg(dev, "%pa exceeds available %s capacity: %pa\n", &size,
-			cxled->mode == CXL_DECODER_RAM ? "ram" : "pmem",
-			&avail);
+			cxl_decoder_mode_name(cxled->mode), &avail);
 		rc = -ENOSPC;
 		goto out;
 	}

---
base-commit: 1c59d383390f970b891b503b7f79b63a02db2ec5
change-id: 20230902-use-decoder-name-2bbaa033c53e

Best regards,
-- 
Ira Weiny <ira.weiny@intel.com>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-03  2:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-03  2:52 [PATCH] cxl/hdm: Debug, use decoder name function Ira Weiny

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.