Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1483311
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dmaengine: squash lines for immediate return |
| Date | 2016-09-14 15:40 +0200 |
| Message-ID | <shizU-1s7-45@gated-at.bofh.it> (permalink) |
| References | <sgF5w-7Bx-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] dmaengine: squash lines for immediate return Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-09-12 21:30 +0200 Re: [PATCH] dmaengine: squash lines for immediate return Jon Hunter <jonathanh@nvidia.com> - 2016-09-13 10:50 +0200 Re: [PATCH] dmaengine: squash lines for immediate return Vinod Koul <vinod.koul@intel.com> - 2016-09-14 15:40 +0200
csiph-web