public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: dmaengine@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH 09/11] dmaengine: sh: Remove chancnt affectations
Date: Sun, 26 Oct 2014 18:31:44 +0200	[thread overview]
Message-ID: <4174219.1JRhVA0YgA@avalon> (raw)
In-Reply-To: <1413450063-23829-10-git-send-email-maxime.ripard@free-electrons.com>

Hi Maxime,

Thank you for the patch.

On Thursday 16 October 2014 11:01:01 Maxime Ripard wrote:
> chanctnt is already filled by dma_async_device_register, which uses the
> channel list to know how much channels there is.
> 
> Since it's already filled, we can safely remove it from the drivers' probe
> function.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/dma/sh/rcar-audmapp.c | 2 --
>  drivers/dma/sh/rcar-hpbdma.c  | 2 --
>  drivers/dma/sh/shdma-base.c   | 2 +-
>  drivers/dma/sh/shdmac.c       | 2 --
>  drivers/dma/sh/sudmac.c       | 2 --
>  5 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/dma/sh/rcar-audmapp.c b/drivers/dma/sh/rcar-audmapp.c
> index dabbf0aba2e9..fd1005e58551 100644
> --- a/drivers/dma/sh/rcar-audmapp.c
> +++ b/drivers/dma/sh/rcar-audmapp.c
> @@ -248,7 +248,6 @@ static int audmapp_chan_probe(struct platform_device
> *pdev,
> 
>  static void audmapp_chan_remove(struct audmapp_device *audev)
>  {
> -	struct dma_device *dma_dev = &audev->shdma_dev.dma_dev;
>  	struct shdma_chan *schan;
>  	int i;
> 
> @@ -256,7 +255,6 @@ static void audmapp_chan_remove(struct audmapp_device
> *audev) BUG_ON(!schan);
>  		shdma_chan_remove(schan);
>  	}
> -	dma_dev->chancnt = 0;
>  }
> 
>  static struct dma_chan *audmapp_of_xlate(struct of_phandle_args *dma_spec,
> diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
> index b212d9471ab5..5ab921865ffe 100644
> --- a/drivers/dma/sh/rcar-hpbdma.c
> +++ b/drivers/dma/sh/rcar-hpbdma.c
> @@ -619,7 +619,6 @@ error:
> 
>  static void hpb_dmae_chan_remove(struct hpb_dmae_device *hpbdev)
>  {
> -	struct dma_device *dma_dev = &hpbdev->shdma_dev.dma_dev;
>  	struct shdma_chan *schan;
>  	int i;
> 
> @@ -628,7 +627,6 @@ static void hpb_dmae_chan_remove(struct hpb_dmae_device
> *hpbdev)
> 
>  		shdma_chan_remove(schan);
>  	}
> -	dma_dev->chancnt = 0;
>  }
> 
>  static int hpb_dmae_remove(struct platform_device *pdev)
> diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
> index 42d497416196..ed5b0993edfa 100644
> --- a/drivers/dma/sh/shdma-base.c
> +++ b/drivers/dma/sh/shdma-base.c
> @@ -951,7 +951,7 @@ void shdma_chan_probe(struct shdma_dev *sdev,
>  	/* Add the channel to DMA device channel list */
>  	list_add_tail(&schan->dma_chan.device_node,
>  			&sdev->dma_dev.channels);
> -	sdev->schan[sdev->dma_dev.chancnt++] = schan;
> +	sdev->schan[id] = schan;
>  }
>  EXPORT_SYMBOL(shdma_chan_probe);
> 
> diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c
> index 58eb85770eba..b65317c6ea4e 100644
> --- a/drivers/dma/sh/shdmac.c
> +++ b/drivers/dma/sh/shdmac.c
> @@ -572,7 +572,6 @@ err_no_irq:
> 
>  static void sh_dmae_chan_remove(struct sh_dmae_device *shdev)
>  {
> -	struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev;
>  	struct shdma_chan *schan;
>  	int i;
> 
> @@ -581,7 +580,6 @@ static void sh_dmae_chan_remove(struct sh_dmae_device
> *shdev)
> 
>  		shdma_chan_remove(schan);
>  	}
> -	dma_dev->chancnt = 0;
>  }
> 
>  static void sh_dmae_shutdown(struct platform_device *pdev)
> diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
> index 3ce103909896..69a5c7b87ee0 100644
> --- a/drivers/dma/sh/sudmac.c
> +++ b/drivers/dma/sh/sudmac.c
> @@ -295,7 +295,6 @@ err_no_irq:
> 
>  static void sudmac_chan_remove(struct sudmac_device *su_dev)
>  {
> -	struct dma_device *dma_dev = &su_dev->shdma_dev.dma_dev;
>  	struct shdma_chan *schan;
>  	int i;
> 
> @@ -304,7 +303,6 @@ static void sudmac_chan_remove(struct sudmac_device
> *su_dev)
> 
>  		shdma_chan_remove(schan);
>  	}
> -	dma_dev->chancnt = 0;
>  }
> 
>  static dma_addr_t sudmac_slave_addr(struct shdma_chan *schan)

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2014-10-26 16:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16  9:00 [PATCH 00/11] dmaengine: Cleanup chancnt Maxime Ripard
2014-10-16  9:00 ` [PATCH 01/11] dmaengine: pl08x: Remove chancnt affectations Maxime Ripard
2014-10-16  9:00 ` [PATCH 02/11] dmaengine: bcm2835: " Maxime Ripard
2014-10-16  9:00 ` [PATCH 03/11] dmaengine: jz4740: " Maxime Ripard
2014-10-16  9:00 ` [PATCH 04/11] dmaengine: fsldma: " Maxime Ripard
2014-10-16  9:00 ` [PATCH 05/11] dmaengine: k3: " Maxime Ripard
2014-10-16  9:00 ` [PATCH 06/11] dmaengine: mpc512x: " Maxime Ripard
2014-10-16  9:00 ` [PATCH 07/11] dmaengine: omap: " Maxime Ripard
2014-10-16  9:01 ` [PATCH 08/11] dmaengine: sa11x0: " Maxime Ripard
2014-10-16  9:01 ` [PATCH 09/11] dmaengine: sh: " Maxime Ripard
2014-10-26 16:31   ` Laurent Pinchart [this message]
2014-10-16  9:01 ` [PATCH 10/11] dmaengine: sirf: " Maxime Ripard
2014-10-16  9:01 ` [PATCH 11/11] dmaengine: sun6i: " Maxime Ripard
2014-10-16  9:03 ` [PATCH 00/11] dmaengine: Cleanup chancnt Vinod Koul
2014-11-05 13:51   ` Maxime Ripard
2014-11-06  6:06 ` Vinod Koul
2014-11-06  9:58   ` Maxime Ripard

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=4174219.1JRhVA0YgA@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=vinod.koul@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox