Re: [PATCH v5 30/38] dmabuf: fix common struct sg_table related issues

2020-05-15 Thread Gerd Hoffmann
> diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c > index acb26c6..89e293b 100644 > --- a/drivers/dma-buf/udmabuf.c > +++ b/drivers/dma-buf/udmabuf.c > @@ -63,10 +63,9 @@ static struct sg_table *get_sg_table(struct device *dev, > struct dma_buf *buf, >

[PATCH v5 30/38] dmabuf: fix common struct sg_table related issues

2020-05-13 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the