All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: amd-pmc: Use return code on suspend
@ 2021-07-07 14:16 Mario Limonciello
  2021-07-14 20:31 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2021-07-07 14:16 UTC (permalink / raw)
  To: Hans de Goede, Mark Gross, open list:X86 PLATFORM DRIVERS
  Cc: Mario Limonciello, Shyam Sundar S K

Right now the driver will still return success even if the OS_HINT
command failed to send to the SMU. In the rare event of a failure,
the suspend should really be aborted here so that relevant logs
can may be captured.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/platform/x86/amd-pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
index d2f9a62e1166..680f94c7e075 100644
--- a/drivers/platform/x86/amd-pmc.c
+++ b/drivers/platform/x86/amd-pmc.c
@@ -353,7 +353,7 @@ static int __maybe_unused amd_pmc_suspend(struct device *dev)
 	if (rc)
 		dev_err(pdev->dev, "suspend failed\n");
 
-	return 0;
+	return rc;
 }
 
 static int __maybe_unused amd_pmc_resume(struct device *dev)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] platform/x86: amd-pmc: Use return code on suspend
  2021-07-07 14:16 [PATCH] platform/x86: amd-pmc: Use return code on suspend Mario Limonciello
@ 2021-07-14 20:31 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2021-07-14 20:31 UTC (permalink / raw)
  To: Mario Limonciello, Mark Gross, open list:X86 PLATFORM DRIVERS
  Cc: Shyam Sundar S K

Hi,

On 7/7/21 4:16 PM, Mario Limonciello wrote:
> Right now the driver will still return success even if the OS_HINT
> command failed to send to the SMU. In the rare event of a failure,
> the suspend should really be aborted here so that relevant logs
> can may be captured.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

I will also apply this to the fixes branch and include it in my
upcoming v5.14 pdx86 fixes pull-req to Linus.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans

> ---
>  drivers/platform/x86/amd-pmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
> index d2f9a62e1166..680f94c7e075 100644
> --- a/drivers/platform/x86/amd-pmc.c
> +++ b/drivers/platform/x86/amd-pmc.c
> @@ -353,7 +353,7 @@ static int __maybe_unused amd_pmc_suspend(struct device *dev)
>  	if (rc)
>  		dev_err(pdev->dev, "suspend failed\n");
>  
> -	return 0;
> +	return rc;
>  }
>  
>  static int __maybe_unused amd_pmc_resume(struct device *dev)
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-14 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 14:16 [PATCH] platform/x86: amd-pmc: Use return code on suspend Mario Limonciello
2021-07-14 20:31 ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.