2022-04-12 20:38:27

by CGEL

[permalink] [raw]
Subject: [PATCH] soc: ti: knav_dma: 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/knav_dma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
index 700d8eecd8c4..061f92c8cf7d 100644
--- a/drivers/soc/ti/knav_dma.c
+++ b/drivers/soc/ti/knav_dma.c
@@ -747,9 +747,8 @@ static int knav_dma_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&kdev->list);

pm_runtime_enable(kdev->dev);
- ret = pm_runtime_get_sync(kdev->dev);
+ ret = pm_runtime_resume_and_get(kdev->dev);
if (ret < 0) {
- pm_runtime_put_noidle(kdev->dev);
dev_err(kdev->dev, "unable to enable pktdma, err %d\n", ret);
goto err_pm_disable;
}
--
2.25.1


2022-04-12 23:46:48

by Grygorii Strashko

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



On 12/04/2022 11:29, [email protected] wrote:
> 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/knav_dma.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
> index 700d8eecd8c4..061f92c8cf7d 100644
> --- a/drivers/soc/ti/knav_dma.c
> +++ b/drivers/soc/ti/knav_dma.c
> @@ -747,9 +747,8 @@ static int knav_dma_probe(struct platform_device *pdev)
> INIT_LIST_HEAD(&kdev->list);
>
> pm_runtime_enable(kdev->dev);
> - ret = pm_runtime_get_sync(kdev->dev);
> + ret = pm_runtime_resume_and_get(kdev->dev);
> if (ret < 0) {
> - pm_runtime_put_noidle(kdev->dev);
> dev_err(kdev->dev, "unable to enable pktdma, err %d\n", ret);
> goto err_pm_disable;
> }

Thank you.
Reviewed-by: Grygorii Strashko <[email protected]>

--
Best regards,
Grygorii, Ukraine

2022-04-16 01:23:25

by Nishanth Menon

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

Hi [email protected],

On Tue, 12 Apr 2022 08:29:23 +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: knav_dma: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
commit: d3e3116f253591a473873fab8363ecb998ddde13

(Minor $subject cleanup and commit message spell fixup)

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