dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Haowen Bai <baihaowen@meizu.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: pl08x: remove unneeded variable: "retval". Return "NULL"
Date: Mon, 11 Apr 2022 19:34:59 +0530	[thread overview]
Message-ID: <YlQ1i3DFqoFFFszO@matsya> (raw)
In-Reply-To: <1647512562-18246-1-git-send-email-baihaowen@meizu.com>

On 17-03-22, 18:22, Haowen Bai wrote:
> Unneeded variable: "retval". Return "NULL" , so we have to make code clear.
> 
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
>  drivers/dma/amba-pl08x.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index a24882b..c70552a 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -1538,9 +1538,7 @@ static void pl08x_free_chan_resources(struct dma_chan *chan)
>  static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt(
>  		struct dma_chan *chan, unsigned long flags)
>  {
> -	struct dma_async_tx_descriptor *retval = NULL;
> -
> -	return retval;
> +	return NULL;

better way, drop the function?

>  }
>  
>  /*
> -- 
> 2.7.4

-- 
~Vinod

  reply	other threads:[~2022-04-11 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 10:22 [PATCH] dmaengine: pl08x: remove unneeded variable: "retval". Return "NULL" Haowen Bai
2022-04-11 14:04 ` Vinod Koul [this message]
2022-04-12  1:14   ` [PATCH V2] dmaengine: pl08x: drop the useless function "NULL" Haowen Bai
2022-04-12  1:16   ` [PATCH V3] dmaengine: pl08x: drop the useless function Haowen Bai
2022-04-20 11:49     ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YlQ1i3DFqoFFFszO@matsya \
    --to=vkoul@kernel.org \
    --cc=baihaowen@meizu.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).