crypto: ixp4xx - Use sg_virt()
authorGeliang Tang <geliangtang@gmail.com>
Thu, 23 Mar 2017 13:16:30 +0000 (21:16 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 24 Mar 2017 14:03:01 +0000 (22:03 +0800)
Use sg_virt() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ixp4xx_crypto.c

index 7868765a70c5f8d780dfea9bb1f6057348be170f..771dd26c7076e1c3b9282ec9ab96d735aa08c2ff 100644 (file)
@@ -806,7 +806,7 @@ static struct buffer_desc *chainup_buffers(struct device *dev,
                void *ptr;
 
                nbytes -= len;
-               ptr = page_address(sg_page(sg)) + sg->offset;
+               ptr = sg_virt(sg);
                next_buf = dma_pool_alloc(buffer_pool, flags, &next_buf_phys);
                if (!next_buf) {
                        buf = NULL;