All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Tian Tao <tiantao6@hisilicon.com>, l.stelmach@samsung.com
Cc: linux-samsung-soc@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding
Date: Fri, 21 May 2021 07:24:05 -0400	[thread overview]
Message-ID: <d871c39a-2592-d50d-9a8d-69dc54b3fd55@canonical.com> (raw)
In-Reply-To: <1621569489-20554-1-git-send-email-tiantao6@hisilicon.com>

On 20/05/2021 23:58, Tian Tao wrote:
> use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
> pm_runtime_put_noidle. this change is just to simplify the code, no
> actual functional changes.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
>  drivers/char/hw_random/exynos-trng.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c
> index 8e1fe3f..d71ef3c 100644
> --- a/drivers/char/hw_random/exynos-trng.c
> +++ b/drivers/char/hw_random/exynos-trng.c
> @@ -196,10 +196,9 @@ static int __maybe_unused exynos_trng_resume(struct device *dev)
>  {
>  	int ret;
>  
> -	ret = pm_runtime_get_sync(dev);
> -	if (ret < 0) {
> +	ret = pm_runtime_resume_and_get(dev);
> +	if (ret) {
>  		dev_err(dev, "Could not get runtime PM.\n");
> -		pm_runtime_put_noidle(dev);
>  		return ret;

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

  reply	other threads:[~2021-05-21 11:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  3:58 [PATCH] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding Tian Tao
2021-05-21 11:24 ` Krzysztof Kozlowski [this message]
     [not found] ` <CGME20210524083244eucas1p263470ad84270aa59c06432c92cf56280@eucas1p2.samsung.com>
2021-05-24  8:32   ` Lukasz Stelmach

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=d871c39a-2592-d50d-9a8d-69dc54b3fd55@canonical.com \
    --to=krzysztof.kozlowski@canonical.com \
    --cc=l.stelmach@samsung.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tiantao6@hisilicon.com \
    /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 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.