All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: dmaengine@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Peter Griffin <peter.griffin@linaro.org>,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stephen Warren <swarren@wwwdotorg.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH] dmaengine: squash lines for immediate return
Date: Wed, 14 Sep 2016 19:07:34 +0530	[thread overview]
Message-ID: <20160914133734.GI13920@localhost> (raw)
In-Reply-To: <1473708054-30989-1-git-send-email-yamada.masahiro@socionext.com>

On Tue, Sep 13, 2016 at 04:20:54AM +0900, Masahiro Yamada wrote:
> Remove unneeded variables and assignments.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  drivers/dma/cppi41.c          | 30 +++++-------------------------
>  drivers/dma/imx-sdma.c        | 15 ++++-----------
>  drivers/dma/ppc4xx/adma.c     | 15 ++++++---------
>  drivers/dma/tegra20-apb-dma.c |  4 +---

pls split per driver

>  static int cppi41_dma_alloc_chan_resources(struct dma_chan *chan)
> @@ -433,11 +429,7 @@ static u32 get_host_pd0(u32 length)
>  
>  static u32 get_host_pd1(struct cppi41_channel *c)
>  {
> -	u32 reg;
> -
> -	reg = 0;
> -
> -	return reg;
> +	return 0;
>  }

why to have this, can you fix the calling code...

>  
>  static u32 get_host_pd2(struct cppi41_channel *c)
> @@ -452,12 +444,8 @@ static u32 get_host_pd2(struct cppi41_channel *c)
>  
>  static u32 get_host_pd3(u32 length)
>  {
> -	u32 reg;
> -
>  	/* PD3 = packet size */
> -	reg = length;
> -
> -	return reg;
> +	return length;
>  }

so we are essentially returning back the arg, lets remove this as well
please

>  
>  static u32 get_host_pd6(u32 length)
> @@ -473,20 +461,12 @@ static u32 get_host_pd6(u32 length)
>  
>  static u32 get_host_pd4_or_7(u32 addr)
>  {
> -	u32 reg;
> -
> -	reg = addr;
> -
> -	return reg;
> +	return addr;
>  }

same here too

>  
>  static u32 get_host_pd5(void)
>  {
> -	u32 reg;
> -
> -	reg = 0;
> -
> -	return reg;
> +	return 0;
>  }

and this one too

-- 
~Vinod

      parent reply	other threads:[~2016-09-14 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 19:20 [PATCH] dmaengine: squash lines for immediate return Masahiro Yamada
2016-09-12 19:20 ` Masahiro Yamada
     [not found] ` <1473708054-30989-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2016-09-13  8:45   ` Jon Hunter
2016-09-13  8:45     ` Jon Hunter
2016-09-14 13:37 ` Vinod Koul [this message]

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=20160914133734.GI13920@localhost \
    --to=vinod.koul@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gnurou@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    --cc=tony@atomide.com \
    --cc=yamada.masahiro@socionext.com \
    /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 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.