summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-04-22 04:18:04 +0300
committerVinod Koul <vinod.koul@intel.com>2017-04-24 16:10:03 +0300
commitb70e52cacb3bff1cc6fae36a89e0fa9d33fe31a7 (patch)
treed064f39c191fa4065c63984d9551586ac5e8b952 /drivers/dma
parentf62e5f613e124911b955e4a804a5fceb37c82993 (diff)
downloadlinux-b70e52cacb3bff1cc6fae36a89e0fa9d33fe31a7.tar.xz
dmaengine: mv_xor: use offset_in_page() macro
Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/mv_xor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index ea53b879859c..25bc5b103aa2 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -960,7 +960,7 @@ static int mv_chan_memcpy_self_test(struct mv_xor_chan *mv_chan)
}
src_dma = dma_map_page(dma_chan->device->dev, virt_to_page(src),
- (size_t)src & ~PAGE_MASK, PAGE_SIZE,
+ offset_in_page(src), PAGE_SIZE,
DMA_TO_DEVICE);
unmap->addr[0] = src_dma;
@@ -972,7 +972,7 @@ static int mv_chan_memcpy_self_test(struct mv_xor_chan *mv_chan)
unmap->to_cnt = 1;
dest_dma = dma_map_page(dma_chan->device->dev, virt_to_page(dest),
- (size_t)dest & ~PAGE_MASK, PAGE_SIZE,
+ offset_in_page(dest), PAGE_SIZE,
DMA_FROM_DEVICE);
unmap->addr[1] = dest_dma;