diff mbox series

cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry

Message ID 167027170051.3542509.10494781536638424397.stgit@dwillia2-xfh.jf.intel.com
State Accepted
Commit d3cdf4585f2f9122d1165acca40e801c75afa320
Headers show
Series cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry | expand

Commit Message

Dan Williams Dec. 5, 2022, 8:21 p.m. UTC
From: Robert Richter <rrichter@amd.com>

After parsing for a CHBCR in cxl_get_chbcr() the case of (ctx.chbcr ==
CXL_RESOURCE_NONE) is a slighly different error reason than the
!ctx.chbcr case. In the first case the CHBS was found but the CHBCR
was invalid or something else failed to determine it, while in the
latter case no CHBS entry exists at all.

Update the warning message to reflect this. The log messages for both
cases can be differentiated now and the reason for a failure can be
determined better.

Signed-off-by: Robert Richter <rrichter@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/cxl/acpi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Dave Jiang Dec. 5, 2022, 9:01 p.m. UTC | #1
On 12/5/2022 1:21 PM, Dan Williams wrote:
> From: Robert Richter <rrichter@amd.com>
> 
> After parsing for a CHBCR in cxl_get_chbcr() the case of (ctx.chbcr ==
> CXL_RESOURCE_NONE) is a slighly different error reason than the
> !ctx.chbcr case. In the first case the CHBS was found but the CHBCR
> was invalid or something else failed to determine it, while in the
> latter case no CHBS entry exists at all.
> 
> Update the warning message to reflect this. The log messages for both
> cases can be differentiated now and the reason for a failure can be
> determined better.
> 
> Signed-off-by: Robert Richter <rrichter@amd.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>   drivers/cxl/acpi.c |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
> index 420e322c85a1..f495f3ce45d1 100644
> --- a/drivers/cxl/acpi.c
> +++ b/drivers/cxl/acpi.c
> @@ -455,7 +455,8 @@ static int add_host_bridge_dport(struct device *match, void *arg)
>   		dev_dbg(match, "RCRB found for UID %lld: %pa\n", uid, &ctx.rcrb);
>   
>   	if (ctx.chbcr == CXL_RESOURCE_NONE) {
> -		dev_warn(match, "No CHBS found for Host Bridge (UID %lld)\n", uid);
> +		dev_warn(match, "CHBCR invalid for Host Bridge (UID %lld)\n",
> +			 uid);
>   		return 0;
>   	}
>   
>
diff mbox series

Patch

diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index 420e322c85a1..f495f3ce45d1 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -455,7 +455,8 @@  static int add_host_bridge_dport(struct device *match, void *arg)
 		dev_dbg(match, "RCRB found for UID %lld: %pa\n", uid, &ctx.rcrb);
 
 	if (ctx.chbcr == CXL_RESOURCE_NONE) {
-		dev_warn(match, "No CHBS found for Host Bridge (UID %lld)\n", uid);
+		dev_warn(match, "CHBCR invalid for Host Bridge (UID %lld)\n",
+			 uid);
 		return 0;
 	}