microblaze: use sg_phys()
authorGeliang Tang <geliangtang@gmail.com>
Thu, 23 Mar 2017 13:16:32 +0000 (21:16 +0800)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 29 May 2017 09:00:02 +0000 (11:00 +0200)
Use sg_phys() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/microblaze/kernel/dma.c

index 12e093a03e60374c9a10222e5755a0f63e143aa2..e45ada8fb00669a8889284db230908ed64f2dda1 100644 (file)
@@ -65,8 +65,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
                if (attrs & DMA_ATTR_SKIP_CPU_SYNC)
                        continue;
 
-               __dma_sync(page_to_phys(sg_page(sg)) + sg->offset,
-                                                       sg->length, direction);
+               __dma_sync(sg_phys(sg), sg->length, direction);
        }
 
        return nents;