linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dmaengine: Move dma_get_slave_caps() implementation to dmaengine.c
Date: Sat, 17 Jan 2015 12:15:46 +0200	[thread overview]
Message-ID: <9606747.CdPEmsmUAn@avalon> (raw)
In-Reply-To: <1414535458-21699-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

Hi Vinod, Maxime,

On Wednesday 29 October 2014 00:30:58 Laurent Pinchart wrote:
> The function is too big to be a static inline.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Ping ? Could this patch get in v3.20 ?

> ---
>  drivers/dma/dmaengine.c   | 33 +++++++++++++++++++++++++++++++++
>  include/linux/dmaengine.h | 32 +-------------------------------
>  2 files changed, 34 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
> index 300c8cd2786c..caa91abca2ee 100644
> --- a/drivers/dma/dmaengine.c
> +++ b/drivers/dma/dmaengine.c
> @@ -480,6 +480,39 @@ static void dma_channel_rebalance(void)
>  		}
>  }
> 
> +int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
> +{
> +	struct dma_device *device;
> +
> +	if (!chan || !caps)
> +		return -EINVAL;
> +
> +	device = chan->device;
> +
> +	/* check if the channel supports slave transactions */
> +	if (!test_bit(DMA_SLAVE, device->cap_mask.bits))
> +		return -ENXIO;
> +
> +	/*
> +	 * Check whether it reports it uses the generic slave
> +	 * capabilities, if not, that means it doesn't support any
> +	 * kind of slave capabilities reporting.
> +	 */
> +	if (!device->directions)
> +		return -ENXIO;
> +
> +	caps->src_addr_widths = device->src_addr_widths;
> +	caps->dst_addr_widths = device->dst_addr_widths;
> +	caps->directions = device->directions;
> +	caps->residue_granularity = device->residue_granularity;
> +
> +	caps->cmd_pause = !!device->device_pause;
> +	caps->cmd_terminate = !!device->device_terminate_all;
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL_GPL(dma_get_slave_caps);
> +
>  static struct dma_chan *private_candidate(const dma_cap_mask_t *mask,
>  					  struct dma_device *dev,
>  					  dma_filter_fn fn, void *fn_param)
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index b01b7a7c581b..92e0ca01061c 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -757,37 +757,7 @@ static inline struct dma_async_tx_descriptor
> *dmaengine_prep_dma_sg( src_sg, src_nents, flags);
>  }
> 
> -static inline int dma_get_slave_caps(struct dma_chan *chan, struct
> dma_slave_caps *caps) -{
> -	struct dma_device *device;
> -
> -	if (!chan || !caps)
> -		return -EINVAL;
> -
> -	device = chan->device;
> -
> -	/* check if the channel supports slave transactions */
> -	if (!test_bit(DMA_SLAVE, device->cap_mask.bits))
> -		return -ENXIO;
> -
> -	/*
> -	 * Check whether it reports it uses the generic slave
> -	 * capabilities, if not, that means it doesn't support any
> -	 * kind of slave capabilities reporting.
> -	 */
> -	if (!device->directions)
> -		return -ENXIO;
> -
> -	caps->src_addr_widths = device->src_addr_widths;
> -	caps->dst_addr_widths = device->dst_addr_widths;
> -	caps->directions = device->directions;
> -	caps->residue_granularity = device->residue_granularity;
> -
> -	caps->cmd_pause = !!device->device_pause;
> -	caps->cmd_terminate = !!device->device_terminate_all;
> -
> -	return 0;
> -}
> +int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps);
> 
>  static inline int dmaengine_terminate_all(struct dma_chan *chan)
>  {

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2015-01-17 10:15 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 21:25 [PATCH v4 00/58] dmaengine: Implement generic slave capabilities retrieval Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 01/58] crypto: ux500: Use dmaengine_terminate_all API Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 02/58] serial: at91: Use dmaengine_slave_config API Maxime Ripard
2014-11-03 11:12   ` Nicolas Ferre
2014-11-03 12:33     ` Maxime Ripard
2014-11-03 17:46       ` Nicolas Ferre
2014-10-28 21:25 ` [PATCH v4 03/58] dmaengine: Make the destination abbreviation coherent Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 04/58] dmaengine: Rework dma_chan_get Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 05/58] dmaengine: Make channel allocation callbacks optional Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 06/58] dmaengine: Introduce a device_config callback Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 07/58] dmaengine: split out pause/resume operations from device_control Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 08/58] dmaengine: Add device_terminate_all callback Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 09/58] dmaengine: Remove the need to declare device_control Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 10/58] dmaengine: Create a generic dma_slave_caps callback Maxime Ripard
2014-10-28 22:30   ` [PATCH] dmaengine: Move dma_get_slave_caps() implementation to dmaengine.c Laurent Pinchart
2015-01-17 10:15     ` Laurent Pinchart [this message]
2015-01-18 14:26     ` Vinod Koul
2014-10-28 22:31   ` [PATCH v4 10/58] dmaengine: Create a generic dma_slave_caps callback Laurent Pinchart
2014-10-28 21:25 ` [PATCH v4 11/58] dmaengine: pl08x: Split device_control Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 12/58] dmaengine: hdmac: " Maxime Ripard
2014-11-03 11:15   ` Nicolas Ferre
2014-10-28 21:25 ` [PATCH v4 13/58] dmaengine: bcm2835: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 14/58] dmaengine: coh901318: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 15/58] dmaengine: cppi41: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 16/58] dmaengine: jz4740: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 17/58] dmaengine: dw: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 18/58] dmaengine: edma: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 19/58] dmaengine: ep93xx: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 20/58] dmaengine: fsl-edma: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 21/58] dmaengine: imx: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 22/58] dmaengine: imx-sdma: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 23/58] dmaengine: intel-mid-dma: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 24/58] dmaengine: ipu-idmac: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 25/58] dmaengine: k3: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 26/58] dmaengine: mmp-pdma: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 27/58] dmaengine: mmp-tdma: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 28/58] dmaengine: moxart: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 29/58] dmaengine: fsl-dma: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 30/58] dmaengine: mpc512x: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 31/58] dmaengine: mxs: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 32/58] dmaengine: nbpfaxi: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 33/58] dmaengine: omap: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 34/58] dmaengine: pl330: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 35/58] dmaengine: bam-dma: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 36/58] dmaengine: s3c24xx: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 37/58] dmaengine: sa11x0: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 38/58] dmaengine: sh: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 39/58] dmaengine: sirf: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 40/58] dmaengine: sun6i: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 41/58] dmaengine: d40: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 42/58] dmaengine: tegra20: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 43/58] dmaengine: xilinx: " Maxime Ripard
2014-10-28 21:25 ` [PATCH v4 44/58] dmaengine: mv_xor: Remove device_control Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 45/58] dmaengine: pch-dma: Rename device_control Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 46/58] dmaengine: td: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 47/58] dmaengine: txx9: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 48/58] dmaengine: rapidio: tsi721: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 49/58] dmaengine: bcm2835: Declare slave capabilities for the generic code Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 50/58] dmaengine: fsl-edma: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 51/58] dmaengine: edma: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 52/58] dmaengine: nbpfaxi: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 53/58] dmaengine: omap: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 54/58] dmaengine: pl330: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 55/58] dmaengine: sirf: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 56/58] dmaengine: sun6i: " Maxime Ripard
2014-10-28 21:26 ` [PATCH v4 57/58] dmaengine: Add a warning for drivers not using the generic slave caps retrieval Maxime Ripard
2014-10-28 22:06   ` Laurent Pinchart
2014-10-28 21:26 ` [PATCH v4 58/58] dmaengine: Remove device_control and device_slave_caps Maxime Ripard
2014-11-06 14:33 ` [PATCH v4 00/58] dmaengine: Implement generic slave capabilities retrieval Maxime Ripard
2014-11-12 11:25   ` Vinod Koul
2014-11-12 13:15     ` Maxime Ripard
2014-11-13 15:30       ` 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=9606747.CdPEmsmUAn@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.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).