[RESEND][PATCH v1] dmaengine: sh: Discard pm_runtime_put() return value

Rafael J. Wysocki posted 1 patch 1 month ago
drivers/dma/sh/shdma-base.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[RESEND][PATCH v1] dmaengine: sh: Discard pm_runtime_put() return value
Posted by Rafael J. Wysocki 1 month ago
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Clobbering an error value to be returned from shdma_tx_submit() with
a pm_runtime_put() return value is not particularly useful, especially
if the latter is 0, so stop doing that.

This will facilitate a planned change of the pm_runtime_put() return
type to void in the future.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

This is requisite for converting pm_runtime_put() into a void function.

If you decide to pick it up, please let me know.

Otherwise, an ACK or equivalent will be appreciated, but also the lack
of specific criticism will be eventually regarded as consent.

Originally posted here:

https://lore.kernel.org/linux-pm/9626129.rMLUfLXkoz@rafael.j.wysocki/

---
 drivers/dma/sh/shdma-base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -143,7 +143,7 @@ static dma_cookie_t shdma_tx_submit(stru
 				}
 
 				schan->pm_state = SHDMA_PM_ESTABLISHED;
-				ret = pm_runtime_put(schan->dev);
+				pm_runtime_put(schan->dev);
 
 				spin_unlock_irq(&schan->chan_lock);
 				return ret;
Re: [RESEND][PATCH v1] dmaengine: sh: Discard pm_runtime_put() return value
Posted by Vinod Koul 1 month ago
On 08-01-26, 16:28, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Clobbering an error value to be returned from shdma_tx_submit() with
> a pm_runtime_put() return value is not particularly useful, especially
> if the latter is 0, so stop doing that.
> 
> This will facilitate a planned change of the pm_runtime_put() return
> type to void in the future.

Hey Rafael,

This is commit b442377c0ea2044a8f50ffa3fe59448f9ed922c in my tree.

> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> 
> This is requisite for converting pm_runtime_put() into a void function.
> 
> If you decide to pick it up, please let me know.
> 
> Otherwise, an ACK or equivalent will be appreciated, but also the lack
> of specific criticism will be eventually regarded as consent.
> 
> Originally posted here:
> 
> https://lore.kernel.org/linux-pm/9626129.rMLUfLXkoz@rafael.j.wysocki/
> 
> ---
>  drivers/dma/sh/shdma-base.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/dma/sh/shdma-base.c
> +++ b/drivers/dma/sh/shdma-base.c
> @@ -143,7 +143,7 @@ static dma_cookie_t shdma_tx_submit(stru
>  				}
>  
>  				schan->pm_state = SHDMA_PM_ESTABLISHED;
> -				ret = pm_runtime_put(schan->dev);
> +				pm_runtime_put(schan->dev);
>  
>  				spin_unlock_irq(&schan->chan_lock);
>  				return ret;
> 
> 

-- 
~Vinod
Re: [RESEND][PATCH v1] dmaengine: sh: Discard pm_runtime_put() return value
Posted by Rafael J. Wysocki 4 weeks, 1 day ago
On Fri, Jan 9, 2026 at 3:42 AM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 08-01-26, 16:28, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Clobbering an error value to be returned from shdma_tx_submit() with
> > a pm_runtime_put() return value is not particularly useful, especially
> > if the latter is 0, so stop doing that.
> >
> > This will facilitate a planned change of the pm_runtime_put() return
> > type to void in the future.
>
> Hey Rafael,
>
> This is commit b442377c0ea2044a8f50ffa3fe59448f9ed922c in my tree.

Cool, thanks!