Skip to contentSkip to conversation

cxl/hdm: Debug, use decoder name function

PATCH New Ira Weiny 1 participant 1 message Sep 3, 2023 CXL

lore
Share & tools
lore

Ira Weiny

author
#0 lore raw

PATCH 1/1 cxl/hdm: Debug, use decoder name function

The decoder enum has a name conversion function defined now.

Use that instead of open coding.

---
Changes:
[iweiny: split out from DCD series]
https://lore.kernel.org/r/[email protected]

---
 drivers/cxl/core/hdm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/cxl/core/hdm.c +1 -2
index 4449b34a80cc..4fa49923eac0 100644
@@ -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,

Signature · 1 line
Ira Weiny <[email protected]>