Re: [PATCH RFC 07/11] crypto: caam: check and use dma_map_sg() return code

2015-12-09 Thread Horia Geantă
On 12/7/2015 9:12 PM, Russell King wrote: > Strictly, dma_map_sg() may coalesce SG entries, but in practise on iMX > hardware, this will never happen. However, dma_map_sg() can fail, and > we completely fail to check its return value. So, fix this properly. > > Arrange the code to map the

Re: [PATCH RFC 07/11] crypto: caam: check and use dma_map_sg() return code

2015-12-09 Thread Russell King - ARM Linux
On Wed, Dec 09, 2015 at 05:20:45PM +0200, Horia Geantă wrote: > On 12/7/2015 9:12 PM, Russell King wrote: > > Strictly, dma_map_sg() may coalesce SG entries, but in practise on iMX > > hardware, this will never happen. However, dma_map_sg() can fail, and > > we completely fail to check its return

[PATCH RFC 07/11] crypto: caam: check and use dma_map_sg() return code

2015-12-07 Thread Russell King
Strictly, dma_map_sg() may coalesce SG entries, but in practise on iMX hardware, this will never happen. However, dma_map_sg() can fail, and we completely fail to check its return value. So, fix this properly. Arrange the code to map the scatterlist early, so we know how many scatter table