[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220423020218.8DCE5C385A0@smtp.kernel.org>
Date: Fri, 22 Apr 2022 19:02:16 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: cgel.zte@...il.com, mturquette@...libre.com
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Quoting cgel.zte@...il.com (2022-04-18 04:04:55)
> From: Minghao Chi <chi.minghao@....com.cn>
>
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....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.
Powered by blists - more mailing lists