2022-04-08 08:19:13

by CGEL

[permalink] [raw]
Subject: [PATCH] soc: ti: pruss: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

From: Minghao Chi <[email protected]>

Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
---
drivers/soc/ti/pruss.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c
index b36779309e49..0e4ba0f89533 100644
--- a/drivers/soc/ti/pruss.c
+++ b/drivers/soc/ti/pruss.c
@@ -279,10 +279,9 @@ static int pruss_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, pruss);

pm_runtime_enable(dev);
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret < 0) {
dev_err(dev, "couldn't enable module\n");
- pm_runtime_put_noidle(dev);
goto rpm_disable;
}

--
2.25.1


2022-04-08 13:55:28

by Dave Gerlach

[permalink] [raw]
Subject: Re: [PATCH] soc: ti: pruss: using pm_runtime_resume_and_get instead of pm_runtime_get_sync



On 4/8/22 03:08, [email protected] wrote:
> From: Minghao Chi <[email protected]>
>
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
>

Looks good to me.

Reviewed-by: Dave Gerlach <[email protected]>

> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: Minghao Chi <[email protected]>
> ---
> drivers/soc/ti/pruss.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c
> index b36779309e49..0e4ba0f89533 100644
> --- a/drivers/soc/ti/pruss.c
> +++ b/drivers/soc/ti/pruss.c
> @@ -279,10 +279,9 @@ static int pruss_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, pruss);
>
> pm_runtime_enable(dev);
> - ret = pm_runtime_get_sync(dev);
> + ret = pm_runtime_resume_and_get(dev);
> if (ret < 0) {
> dev_err(dev, "couldn't enable module\n");
> - pm_runtime_put_noidle(dev);
> goto rpm_disable;
> }
>

2022-04-12 13:06:35

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH] soc: ti: pruss: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Hi [email protected],

On Fri, 8 Apr 2022 08:08:53 +0000, [email protected] wrote:
> From: Minghao Chi <[email protected]>
>
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
>
>

I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!

[1/1] soc: ti: pruss: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
commit: f25d2b2b554133b935e72c61deb40d82287a6f75

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D