summaryrefslogtreecommitdiff
path: root/lib/dma-debug.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-21 11:11:12 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-21 11:11:12 -0800
commitbfccd95e7aba73d0d3154912b17b855cb9938c50 (patch)
tree3250b7806b873170a3ff7dba0aa1664e57c5bde9 /lib/dma-debug.c
parent252ca494ac75f0dc47469f130d6dc67ed14081f4 (diff)
parent4ef7675344d687a0ef5b0d7c0cee12da005870c0 (diff)
Merge 4.4-rc6 into usb-next
We want the USB and PHY fixes in here as well to make things easier for testing and development. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r--lib/dma-debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 8855f019ebe8..d34bd24c2c84 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -1464,7 +1464,7 @@ void debug_dma_alloc_coherent(struct device *dev, size_t size,
entry->type = dma_debug_coherent;
entry->dev = dev;
entry->pfn = page_to_pfn(virt_to_page(virt));
- entry->offset = (size_t) virt & PAGE_MASK;
+ entry->offset = (size_t) virt & ~PAGE_MASK;
entry->size = size;
entry->dev_addr = dma_addr;
entry->direction = DMA_BIDIRECTIONAL;
@@ -1480,7 +1480,7 @@ void debug_dma_free_coherent(struct device *dev, size_t size,
.type = dma_debug_coherent,
.dev = dev,
.pfn = page_to_pfn(virt_to_page(virt)),
- .offset = (size_t) virt & PAGE_MASK,
+ .offset = (size_t) virt & ~PAGE_MASK,
.dev_addr = addr,
.size = size,
.direction = DMA_BIDIRECTIONAL,