Skip to content

Commit 6ef37af

Browse files
weiny2davejiang
authored andcommitted
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]> Signed-off-by: Ira Weiny <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Fan Ni <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dave Jiang <[email protected]>
1 parent 4cce9c6 commit 6ef37af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/cxl/core/hdm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,7 @@ int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long long size)
519519

520520
if (size > avail) {
521521
dev_dbg(dev, "%pa exceeds available %s capacity: %pa\n", &size,
522-
cxled->mode == CXL_DECODER_RAM ? "ram" : "pmem",
523-
&avail);
522+
cxl_decoder_mode_name(cxled->mode), &avail);
524523
rc = -ENOSPC;
525524
goto out;
526525
}

0 commit comments

Comments
 (0)