cxl/hdm: Debug, use decoder name function
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.
Suggested-by Navneet Singh <[email protected]>
Reviewed-by Jonathan Cameron <[email protected]>
Reviewed-by Dave Jiang <[email protected]>
Reviewed-by Fan Ni <[email protected]>
Signed-off-by Ira Weiny <[email protected]>
---
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
@@ -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]>