Re: [PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-13 Thread Robin Murphy
On 2020-05-12 10:00 am, Marek Szyprowski wrote: struct sg_table is a common structure used for describing a memory buffer. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages

Re: [PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-12 Thread Marek Szyprowski
Hi Christoph, On 12.05.2020 15:09, Christoph Hellwig wrote: > On Tue, May 12, 2020 at 03:00:31PM +0200, Marek Szyprowski wrote: >>> if (n <= 0) >>> return -EINVAL; >>> sgt->nents = n; >>> return 0; >>> >> Indeed this version looks much better. I will resend it in a few minu

Re: [PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-12 Thread Christoph Hellwig
On Tue, May 12, 2020 at 03:00:31PM +0200, Marek Szyprowski wrote: > > if (n <= 0) > > return -EINVAL; > > sgt->nents = n; > > return 0; > > > Indeed this version looks much better. I will resend it in a few minutes. I could also just fix it up when applying the patch. _

Re: [PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-12 Thread Marek Szyprowski
Hi Christoph, On 12.05.2020 14:18, Christoph Hellwig wrote: > On Tue, May 12, 2020 at 11:00:21AM +0200, Marek Szyprowski wrote: >> struct sg_table is a common structure used for describing a memory >> buffer. It consists of a scatterlist with memory pages and DMA addresses >> (sgl entry), as well

Re: [PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-12 Thread Christoph Hellwig
On Tue, May 12, 2020 at 11:00:21AM +0200, Marek Szyprowski wrote: > struct sg_table is a common structure used for describing a memory > buffer. It consists of a scatterlist with memory pages and DMA addresses > (sgl entry), as well as the number of scatterlist entries: CPU pages > (orig_nents entr

[PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-12 Thread Marek Szyprowski
struct sg_table is a common structure used for describing a memory buffer. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common