diff mbox series

[v3,3/3] platform/x86/amd/hsmp: improve the error log

Message ID 20230919092057.2235437-3-suma.hegde@amd.com (mailing list archive)
State Rejected, archived
Headers show
Series [v3,1/3] platform/x86/amd/hsmp: create plat specific struct | expand

Commit Message

Suma Hegde Sept. 19, 2023, 9:20 a.m. UTC
1. Change print message during platform init to a more meaningful
   clear message.
2. Return the error code returned by hsmp_test() itself, rather then
   returning a common EOPNOTSUPP error.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Reviewed-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
---
Changes since v1:
1. changed commit message
Changes since v2:
No change

 drivers/platform/x86/amd/hsmp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ilpo Järvinen Sept. 19, 2023, 1 p.m. UTC | #1
On Tue, 19 Sep 2023, Suma Hegde wrote:

> 1. Change print message during platform init to a more meaningful
>    clear message.
> 2. Return the error code returned by hsmp_test() itself, rather then
>    returning a common EOPNOTSUPP error.
> 
> Signed-off-by: Suma Hegde <suma.hegde@amd.com>
> Reviewed-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
> ---
> Changes since v1:
> 1. changed commit message
> Changes since v2:
> No change
> 
>  drivers/platform/x86/amd/hsmp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/platform/x86/amd/hsmp.c b/drivers/platform/x86/amd/hsmp.c
> index fc6fba18844e..c4d324436a40 100644
> --- a/drivers/platform/x86/amd/hsmp.c
> +++ b/drivers/platform/x86/amd/hsmp.c
> @@ -568,10 +568,10 @@ static int __init hsmp_plt_init(void)
>  	for (i = 0; i < plat_dev.num_sockets; i++) {
>  		ret = hsmp_test(i, 0xDEADBEEF);
>  		if (ret) {
> -			pr_err("HSMP is not supported on Fam:%x model:%x\n",
> +			pr_err("HSMP test message failed on Fam:%x model:%x\n",
>  			       boot_cpu_data.x86, boot_cpu_data.x86_model);
> -			pr_err("Or Is HSMP disabled in BIOS ?\n");
> -			return -EOPNOTSUPP;
> +			pr_err("Is HSMP disabled in BIOS ?\n");
> +			return ret;
>  		}
>  	}
>  
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
diff mbox series

Patch

diff --git a/drivers/platform/x86/amd/hsmp.c b/drivers/platform/x86/amd/hsmp.c
index fc6fba18844e..c4d324436a40 100644
--- a/drivers/platform/x86/amd/hsmp.c
+++ b/drivers/platform/x86/amd/hsmp.c
@@ -568,10 +568,10 @@  static int __init hsmp_plt_init(void)
 	for (i = 0; i < plat_dev.num_sockets; i++) {
 		ret = hsmp_test(i, 0xDEADBEEF);
 		if (ret) {
-			pr_err("HSMP is not supported on Fam:%x model:%x\n",
+			pr_err("HSMP test message failed on Fam:%x model:%x\n",
 			       boot_cpu_data.x86, boot_cpu_data.x86_model);
-			pr_err("Or Is HSMP disabled in BIOS ?\n");
-			return -EOPNOTSUPP;
+			pr_err("Is HSMP disabled in BIOS ?\n");
+			return ret;
 		}
 	}