[PATCH 6.19 481/781] cxl/hdm: Fix newline character in dev_err() messages

Greg Kroah-Hartman
2026-02-25T01:36:54Z

From: Robert Richter <rrichter@amd.com>

[ Upstream commit e5b1887619403c2da25a5899cad3e1ab34e7717f ]

The newline character is not placed at the end of the string. This
causes unintended line wraps, broken log level and unterminated log
messages. Fix that for all messages.

Note that the messages are changed to use colons now instead of
parentheses, which is more common use.

Fixes: 24b18197184a ("cxl/hdm: Extend DVSEC range register emulation for region enumeration")
Fixes: 9c57cde0dcbd ("cxl/hdm: Enumerate allocated DPA")
Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/20260109122952.639231-1-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/hdm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index eb5a3a7640c60..a7ad730763e85 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -966,7 +966,7 @@ static int cxl_setup_hdm_decoder_from_dvsec(
rc = devm_cxl_dpa_reserve(cxled, *dpa_base, len, 0);
if (rc) {
dev_err(&port->dev,
- "decoder%d.%d: Failed to reserve DPA range %#llx - %#llx\n (%d)",
+ "decoder%d.%d: Failed to reserve DPA range %#llx - %#llx: %d\n",
port->id, cxld->id, *dpa_base, *dpa_base + len - 1, rc);
return rc;
}
@@ -1117,7 +1117,7 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
rc = devm_cxl_dpa_reserve(cxled, *dpa_base + skip, dpa_size, skip);
if (rc) {
dev_err(&port->dev,
- "decoder%d.%d: Failed to reserve DPA range %#llx - %#llx\n (%d)",
+ "decoder%d.%d: Failed to reserve DPA range %#llx - %#llx: %d\n",
port->id, cxld->id, *dpa_base,
*dpa_base + dpa_size + skip - 1, rc);
return rc;
--
2.51.0