public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: Len Brown <lenb@kernel.org>,
	"open list:ACPI" <linux-acpi@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI: PM: Output correct message on target power state
Date: Sun, 26 Apr 2020 18:37:01 +0200	[thread overview]
Message-ID: <3055388.nd58z99ANK@kreacher> (raw)
In-Reply-To: <20200421075516.23019-1-kai.heng.feng@canonical.com>

On Tuesday, April 21, 2020 9:55:16 AM CEST Kai-Heng Feng wrote:
> Transitioned power state logged at the end of setting ACPI power.
> 
> However, D3cold won't be in the message because state can only be D3hot
> at most.
> 
> Use target_state to corretly report when power state is D3cold.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/acpi/device_pm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
> index b2263ec67b43..5832bc10aca8 100644
> --- a/drivers/acpi/device_pm.c
> +++ b/drivers/acpi/device_pm.c
> @@ -273,13 +273,13 @@ int acpi_device_set_power(struct acpi_device *device, int state)
>   end:
>  	if (result) {
>  		dev_warn(&device->dev, "Failed to change power state to %s\n",
> -			 acpi_power_state_string(state));
> +			 acpi_power_state_string(target_state));
>  	} else {
>  		device->power.state = target_state;
>  		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
>  				  "Device [%s] transitioned to %s\n",
>  				  device->pnp.bus_id,
> -				  acpi_power_state_string(state)));
> +				  acpi_power_state_string(target_state)));
>  	}
>  
>  	return result;
> 

Applied as a fix for 5.7-rc4, thanks!





      reply	other threads:[~2020-04-26 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21  7:55 [PATCH] ACPI: PM: Output correct message on target power state Kai-Heng Feng
2020-04-26 16:37 ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3055388.nd58z99ANK@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=kai.heng.feng@canonical.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox