All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
@ 2022-04-12  8:30 ` cgel.zte
  0 siblings, 0 replies; 8+ messages in thread
From: cgel.zte @ 2022-04-12  8:30 UTC (permalink / raw)
  To: shengjiu.wang
  Cc: alsa-devel, Xiubo.Lee, linuxppc-dev, Zeal Robot, lgirdwood,
	Minghao Chi, linux-kernel, nicoleotsuka, broonie, festevam

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>
---
 sound/soc/fsl/fsl_esai.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index ed444e8f1d6b..1a2bdf8e76f0 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -1050,11 +1050,9 @@ static int fsl_esai_probe(struct platform_device *pdev)
 			goto err_pm_disable;
 	}
 
-	ret = pm_runtime_get_sync(&pdev->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(&pdev->dev);
+	ret = pm_runtime_resume_and_get(&pdev->dev);
+	if (ret < 0)
 		goto err_pm_get_sync;
-	}
 
 	ret = fsl_esai_hw_init(esai_priv);
 	if (ret)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
@ 2022-04-12  8:30 ` cgel.zte
  0 siblings, 0 replies; 8+ messages in thread
From: cgel.zte @ 2022-04-12  8:30 UTC (permalink / raw)
  To: shengjiu.wang
  Cc: Xiubo.Lee, festevam, nicoleotsuka, lgirdwood, broonie,
	alsa-devel, linuxppc-dev, 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>
---
 sound/soc/fsl/fsl_esai.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index ed444e8f1d6b..1a2bdf8e76f0 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -1050,11 +1050,9 @@ static int fsl_esai_probe(struct platform_device *pdev)
 			goto err_pm_disable;
 	}
 
-	ret = pm_runtime_get_sync(&pdev->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(&pdev->dev);
+	ret = pm_runtime_resume_and_get(&pdev->dev);
+	if (ret < 0)
 		goto err_pm_get_sync;
-	}
 
 	ret = fsl_esai_hw_init(esai_priv);
 	if (ret)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
  2022-04-12  8:30 ` cgel.zte
@ 2022-04-12 12:47   ` Shengjiu Wang
  -1 siblings, 0 replies; 8+ messages in thread
From: Shengjiu Wang @ 2022-04-12 12:47 UTC (permalink / raw)
  To: cgel.zte
  Cc: alsa-devel, Xiubo Li, linuxppc-dev, Zeal Robot, Liam Girdwood,
	Minghao Chi, linux-kernel, Nicolin Chen, Mark Brown,
	Fabio Estevam

On Tue, Apr 12, 2022 at 4:30 PM <cgel.zte@gmail.com> wrote:

> 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>
>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

Best regards
Wang Shengjiu

> ---
>  sound/soc/fsl/fsl_esai.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
> index ed444e8f1d6b..1a2bdf8e76f0 100644
> --- a/sound/soc/fsl/fsl_esai.c
> +++ b/sound/soc/fsl/fsl_esai.c
> @@ -1050,11 +1050,9 @@ static int fsl_esai_probe(struct platform_device
> *pdev)
>                         goto err_pm_disable;
>         }
>
> -       ret = pm_runtime_get_sync(&pdev->dev);
> -       if (ret < 0) {
> -               pm_runtime_put_noidle(&pdev->dev);
> +       ret = pm_runtime_resume_and_get(&pdev->dev);
> +       if (ret < 0)
>                 goto err_pm_get_sync;
> -       }
>
>         ret = fsl_esai_hw_init(esai_priv);
>         if (ret)
> --
> 2.25.1
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
@ 2022-04-12 12:47   ` Shengjiu Wang
  0 siblings, 0 replies; 8+ messages in thread
From: Shengjiu Wang @ 2022-04-12 12:47 UTC (permalink / raw)
  To: cgel.zte
  Cc: alsa-devel, Xiubo Li, linuxppc-dev, Zeal Robot, Liam Girdwood,
	Minghao Chi, linux-kernel, Nicolin Chen, Mark Brown,
	Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

On Tue, Apr 12, 2022 at 4:30 PM <cgel.zte@gmail.com> wrote:

> 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>
>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

Best regards
Wang Shengjiu

> ---
>  sound/soc/fsl/fsl_esai.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
> index ed444e8f1d6b..1a2bdf8e76f0 100644
> --- a/sound/soc/fsl/fsl_esai.c
> +++ b/sound/soc/fsl/fsl_esai.c
> @@ -1050,11 +1050,9 @@ static int fsl_esai_probe(struct platform_device
> *pdev)
>                         goto err_pm_disable;
>         }
>
> -       ret = pm_runtime_get_sync(&pdev->dev);
> -       if (ret < 0) {
> -               pm_runtime_put_noidle(&pdev->dev);
> +       ret = pm_runtime_resume_and_get(&pdev->dev);
> +       if (ret < 0)
>                 goto err_pm_get_sync;
> -       }
>
>         ret = fsl_esai_hw_init(esai_priv);
>         if (ret)
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 2054 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
  2022-04-12  8:30 ` cgel.zte
@ 2022-04-12 19:50   ` Mark Brown
  -1 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2022-04-12 19:50 UTC (permalink / raw)
  To: cgel.zte, shengjiu.wang
  Cc: alsa-devel, Xiubo.Lee, festevam, zealci, linux-kernel,
	chi.minghao, lgirdwood, nicoleotsuka, linuxppc-dev

On Tue, 12 Apr 2022 08:30:00 +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
      commit: c721905c54d913db0102973dbcdfb48d91146a2d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a 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.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
@ 2022-04-12 19:50   ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2022-04-12 19:50 UTC (permalink / raw)
  To: cgel.zte, shengjiu.wang
  Cc: nicoleotsuka, zealci, chi.minghao, lgirdwood, Xiubo.Lee,
	linux-kernel, alsa-devel, linuxppc-dev, festevam

On Tue, 12 Apr 2022 08:30:00 +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
      commit: c721905c54d913db0102973dbcdfb48d91146a2d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a 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.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
  2022-04-12  8:30 ` cgel.zte
@ 2022-04-20  7:48   ` Pavel Machek
  -1 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2022-04-20  7:48 UTC (permalink / raw)
  To: cgel.zte
  Cc: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
	broonie, alsa-devel, linuxppc-dev, linux-kernel, Minghao Chi,
	Zeal Robot

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

Hi!

> 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>
> ---
>  sound/soc/fsl/fsl_esai.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
> index ed444e8f1d6b..1a2bdf8e76f0 100644
> --- a/sound/soc/fsl/fsl_esai.c
> +++ b/sound/soc/fsl/fsl_esai.c
> @@ -1050,11 +1050,9 @@ static int fsl_esai_probe(struct platform_device *pdev)
>  			goto err_pm_disable;
>  	}
>  
> -	ret = pm_runtime_get_sync(&pdev->dev);
> -	if (ret < 0) {
> -		pm_runtime_put_noidle(&pdev->dev);
> +	ret = pm_runtime_resume_and_get(&pdev->dev);
> +	if (ret < 0)
>  		goto err_pm_get_sync;
> -	}
>  
>  	ret = fsl_esai_hw_init(esai_priv);
>  	if (ret)

Please take a closer look at that function.

a) error labels are now misnamed

b) there's leak if
   ret = fsl_esai_hw_init(esai_priv);
   if (ret)
     goto err_pm_get_sync;

happens.

Best regards,
							Pavel			   

-- 
People of Russia, stop Putin before his war on Ukraine escalates.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
@ 2022-04-20  7:48   ` Pavel Machek
  0 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2022-04-20  7:48 UTC (permalink / raw)
  To: cgel.zte
  Cc: alsa-devel, Xiubo.Lee, shengjiu.wang, Zeal Robot, linuxppc-dev,
	lgirdwood, Minghao Chi, linux-kernel, nicoleotsuka, broonie,
	festevam

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

Hi!

> 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>
> ---
>  sound/soc/fsl/fsl_esai.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
> index ed444e8f1d6b..1a2bdf8e76f0 100644
> --- a/sound/soc/fsl/fsl_esai.c
> +++ b/sound/soc/fsl/fsl_esai.c
> @@ -1050,11 +1050,9 @@ static int fsl_esai_probe(struct platform_device *pdev)
>  			goto err_pm_disable;
>  	}
>  
> -	ret = pm_runtime_get_sync(&pdev->dev);
> -	if (ret < 0) {
> -		pm_runtime_put_noidle(&pdev->dev);
> +	ret = pm_runtime_resume_and_get(&pdev->dev);
> +	if (ret < 0)
>  		goto err_pm_get_sync;
> -	}
>  
>  	ret = fsl_esai_hw_init(esai_priv);
>  	if (ret)

Please take a closer look at that function.

a) error labels are now misnamed

b) there's leak if
   ret = fsl_esai_hw_init(esai_priv);
   if (ret)
     goto err_pm_get_sync;

happens.

Best regards,
							Pavel			   

-- 
People of Russia, stop Putin before his war on Ukraine escalates.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-20  7:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12  8:30 [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync cgel.zte
2022-04-12  8:30 ` cgel.zte
2022-04-12 12:47 ` Shengjiu Wang
2022-04-12 12:47   ` Shengjiu Wang
2022-04-12 19:50 ` Mark Brown
2022-04-12 19:50   ` Mark Brown
2022-04-20  7:48 ` Pavel Machek
2022-04-20  7:48   ` Pavel Machek

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.