* [PATCH] clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
@ 2022-04-18 11:04 cgel.zte
2022-04-23 2:02 ` Stephen Boyd
2022-04-23 2:03 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-04-18 11:04 UTC (permalink / raw)
To: mturquette; +Cc: sboyd, linux-clk, linux-kernel, Minghao Chi, Zeal Robot
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;
}
static void clk_pm_runtime_put(struct clk_core *core)
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
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
2022-04-23 2:03 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2022-04-23 2:02 UTC (permalink / raw)
To: cgel.zte, mturquette; +Cc: linux-clk, linux-kernel, Minghao Chi, Zeal Robot
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
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
@ 2022-04-23 2:03 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2022-04-23 2:03 UTC (permalink / raw)
To: cgel.zte, mturquette; +Cc: linux-clk, linux-kernel, Minghao Chi, Zeal Robot
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>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-23 2:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-04-23 2:03 ` Stephen Boyd
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.