mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dmaengine: pl330: Handle the return value of pl330_resume
@ 2024-07-17  7:27 Chen Ni
  2024-07-17 11:30 ` Ulf Hansson
  2024-07-17 11:45 ` [PATCH] " Markus Elfring
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Ni @ 2024-07-17  7:27 UTC (permalink / raw)
  To: vkoul, ulf.hansson; +Cc: dmaengine, linux-kernel, Chen Ni

As pm_runtime_force_resume() can return error numbers, it should be
better to check the return value and deal with the exception.

Fixes: a39cddc9e377 ("dmaengine: pl330: Drop boilerplate code for suspend/resume")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/dma/pl330.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 60c4de8dac1d..624ab4eee156 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2993,9 +2993,7 @@ static int __maybe_unused pl330_resume(struct device *dev)
 	if (ret)
 		return ret;
 
-	pm_runtime_force_resume(dev);
-
-	return ret;
+	return pm_runtime_force_resume(dev);
 }
 
 static const struct dev_pm_ops pl330_pm = {
-- 
2.25.1


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

* Re: [PATCH] dmaengine: pl330: Handle the return value of pl330_resume
  2024-07-17  7:27 [PATCH] dmaengine: pl330: Handle the return value of pl330_resume Chen Ni
@ 2024-07-17 11:30 ` Ulf Hansson
  2024-07-17 12:08   ` Markus Elfring
  2024-07-17 11:45 ` [PATCH] " Markus Elfring
  1 sibling, 1 reply; 4+ messages in thread
From: Ulf Hansson @ 2024-07-17 11:30 UTC (permalink / raw)
  To: Chen Ni; +Cc: vkoul, dmaengine, linux-kernel

On Wed, 17 Jul 2024 at 09:29, Chen Ni <nichen@iscas.ac.cn> wrote:
>
> As pm_runtime_force_resume() can return error numbers, it should be
> better to check the return value and deal with the exception.
>
> Fixes: a39cddc9e377 ("dmaengine: pl330: Drop boilerplate code for suspend/resume")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

> ---
>  drivers/dma/pl330.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 60c4de8dac1d..624ab4eee156 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -2993,9 +2993,7 @@ static int __maybe_unused pl330_resume(struct device *dev)
>         if (ret)
>                 return ret;
>
> -       pm_runtime_force_resume(dev);
> -
> -       return ret;
> +       return pm_runtime_force_resume(dev);
>  }
>
>  static const struct dev_pm_ops pl330_pm = {
> --
> 2.25.1
>
>

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

* Re: [PATCH] dmaengine: pl330: Handle the return value of pl330_resume
  2024-07-17  7:27 [PATCH] dmaengine: pl330: Handle the return value of pl330_resume Chen Ni
  2024-07-17 11:30 ` Ulf Hansson
@ 2024-07-17 11:45 ` Markus Elfring
  1 sibling, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2024-07-17 11:45 UTC (permalink / raw)
  To: Chen Ni, dmaengine, Ulf Hansson, Vinod Koul; +Cc: LKML

> As pm_runtime_force_resume() can return error numbers, it should be
> better to check the return value and deal with the exception.

Please improve such a change description with an imperative wording.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10#n94


How do you think about to use a summary phrase like “Return value from
a pm_runtime_force_resume() call in pl330_resume()”?

Regards,
Markus

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

* Re: dmaengine: pl330: Handle the return value of pl330_resume
  2024-07-17 11:30 ` Ulf Hansson
@ 2024-07-17 12:08   ` Markus Elfring
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2024-07-17 12:08 UTC (permalink / raw)
  To: Ulf Hansson, Chen Ni, dmaengine, Dmitry Baryshkov, Vinod Koul
  Cc: linux-kernel, Konrad Dybcio

> > As pm_runtime_force_resume() can return error numbers, it should be
> > better to check the return value and deal with the exception.
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Is there a need to complete the exception handling with a clk_unprepare() call?

Regards,
Markus

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

end of thread, other threads:[~2024-07-17 12:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-17  7:27 [PATCH] dmaengine: pl330: Handle the return value of pl330_resume Chen Ni
2024-07-17 11:30 ` Ulf Hansson
2024-07-17 12:08   ` Markus Elfring
2024-07-17 11:45 ` [PATCH] " Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®