From: Stephen Boyd <sboyd@kernel.org>
To: cgel.zte@gmail.com, mturquette@baylibre.com
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
Minghao Chi <chi.minghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Date: Fri, 22 Apr 2022 19:02:16 -0700 [thread overview]
Message-ID: <20220423020218.8DCE5C385A0@smtp.kernel.org> (raw)
In-Reply-To: <20220418110455.2559264-1-chi.minghao@zte.com.cn>
Quoting cgel.zte@gmail.com (2022-04-18 04:04:55)
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> drivers/clk/clk.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index ed119182aa1b..544e940bf40b 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -113,12 +113,8 @@ static int clk_pm_runtime_get(struct clk_core *core)
> if (!core->rpm_enabled)
> return 0;
>
> - ret = pm_runtime_get_sync(core->dev);
> - if (ret < 0) {
> - pm_runtime_put_noidle(core->dev);
> - return ret;
> - }
> - return 0;
> + ret = pm_runtime_resume_and_get(core->dev);
> + return ret;
return pm_runtime_resume_and_get()
? I got it.
next prev parent reply other threads:[~2022-04-23 2:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 11:04 [PATCH] clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync cgel.zte
2022-04-23 2:02 ` Stephen Boyd [this message]
2022-04-23 2:03 ` Stephen Boyd
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=20220423020218.8DCE5C385A0@smtp.kernel.org \
--to=sboyd@kernel.org \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=zealci@zte.com.cn \
/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