Skip to contentSkip to conversation

cxl: downgrade a warning message to debug level in cxl_probe_component_regs()

PATCH In review Coly Li 4 participants 4 messages Oct 21, 2024 – Oct 25, 2024 CXL

lore
Share & tools
lore

Coly Li

author
#0 lore raw

PATCH 1/1 cxl: downgrade a warning message to debug level in cxl_probe_component_regs()

In cxl_probe_component_regs() the error message "Couldn't locate the CXL.cache and CXL.mem capability array header." is not a critical error message indeed. Downgrade the message from error level to debug level by using dev_dbg() to print the message, and the end users won't worry about the message anymore.

Cc Dan Williams <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Alison Schofield <[email protected]>
---
 drivers/cxl/core/regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/regs.c +1 -1
index e1082e749c69..026690137bc3 100644
@@ -52,7 +52,7 @@ void cxl_probe_component_regs(struct device *dev, void __iomem *base,
 	cap_array = readl(base + CXL_CM_CAP_HDR_OFFSET);
 
 	if (FIELD_GET(CXL_CM_CAP_HDR_ID_MASK, cap_array) != CM_CAP_HDR_CAP_ID) {
-		dev_err(dev,
+		dev_dbg(dev,
 			"Couldn't locate the CXL.cache and CXL.mem capability array header.\n");
 		return;
 	}
Signature · 1 line
2.46.0
#1 lore raw

Thanks Coly and Dan for the efforts!

Best regards,
Kelvin

-----Original Message-----
From: Coly Li <[email protected]>
Sent: Monday, October 21, 2024 1:05 PM
To: [email protected]
Cc: [email protected]; Coly Li <[email protected]>; Kelvin Shieh <[email protected]>; Jonathan Cameron <[email protected]>; Alison Schofield <[email protected]>
Subject: [External] [PATCH] cxl: downgrade a warning message to debug level in cxl_probe_component_regs()

In cxl_probe_component_regs() the error message "Couldn't locate the CXL.cache and CXL.mem capability array header." is not a critical error message indeed. Downgrade the message from error level to debug level by using dev_dbg() to print the message, and the end users won't worry about the message anymore.

Cc Dan Williams <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Alison Schofield <[email protected]>
---
 drivers/cxl/core/regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/regs.c +1 -1
@@ -52,7 +52,7 @@ void cxl_probe_component_regs(struct device *dev, void __iomem *base,
 	cap_array = readl(base + CXL_CM_CAP_HDR_OFFSET);
 
 	if (FIELD_GET(CXL_CM_CAP_HDR_ID_MASK, cap_array) != CM_CAP_HDR_CAP_ID) {
-		dev_err(dev,
+		dev_dbg(dev,
 			"Couldn't locate the CXL.cache and CXL.mem capability array header.\n");
 		return;
 	}

--
2.46.0

Reviewed-by on v1 1/1
#2 lore raw
In reply to Coly Li

[ add Dave and Ira ]

Quoted 3 lines · Coly Li

In cxl_probe_component_regs() the error message "Couldn't locate the CXL.cache and CXL.mem capability array header." is not a critical error message indeed.

Instead of saying "is not a critical error message indeed", lets say "is potentially a false positive error condition". Because if the code could accurately identify that a CXL device is attached, and the CXL link is established, then it defintely would be an error worth reporting.

Quoted 3 lines

Downgrade the message from error level to debug level
by using dev_dbg() to print the message, and the end users won't worry about the message anymore.

Agree, kernel should not be emitting error messages unless it can concretely point to an end user visible loss of functionality.

Dave, or Ira, can you fix up the changelog per above on applying?

#3 lore raw
Quoted 16 lines · Dan Williams

[ add Dave and Ira ]

Quoted 3 lines · Coly Li

In cxl_probe_component_regs() the error message "Couldn't locate the CXL.cache and CXL.mem capability array header." is not a critical error message indeed.

Instead of saying "is not a critical error message indeed", lets say "is potentially a false positive error condition". Because if the code could accurately identify that a CXL device is attached, and the CXL link is established, then it defintely would be an error worth reporting.

Quoted 3 lines

Downgrade the message from error level to debug level
by using dev_dbg() to print the message, and the end users won't worry about the message anymore.

Quoted 6 lines

Agree, kernel should not be emitting error messages unless it can concretely point to an end user visible loss of functionality.

Dave, or Ira, can you fix up the changelog per above on applying?

Yep. Queued in cxl-next

Ira