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 Mon, Nov 14, 2016 at 5:13 AM, Vinod Koul <vinod.koul@xxxxxxxxx> wrote:
> 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..?

I think we may start as global for DMA engine. Anyway, I have to fix
the kbuild bot
warnings, meanwhile I move the stuff to local dmaengine.h.

-- 
With Best Regards,
Andy Shevchenko
--
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