Re: [PATCH v1 01/10] scatterlist: introduce sg_nents_for_dma() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 21, 2016 at 08:35:26PM +0300, Andy Shevchenko wrote:

> +int sg_nents_for_dma(struct scatterlist *sgl, unsigned int sglen, size_t len)
> +{
> +	struct scatterlist *sg;
> +	int i, nents = 0;
> +
> +	for_each_sg(sgl, sg, sglen, i)
> +		nents += DIV_ROUND_UP(sg_dma_len(sg), len);
> +	return nents;
> +}

Should we have this in a global one as it is DMAengine specfic stuff..?

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux