summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-01-10 16:19:47 +0100
committerChristoph Hellwig <hch@lst.de>2018-01-10 16:25:24 +0100
commit10dac04c79b181b255a62f60919f29acc56277ac (patch)
tree40bd6e1ed4bebc448a91fa1878614621b8f0c59d /arch/mips
parent298f0027d5452c171dc9e7caccbd00e36056aaa3 (diff)
downloadtalos-op-linux-10dac04c79b181b255a62f60919f29acc56277ac.tar.gz
talos-op-linux-10dac04c79b181b255a62f60919f29acc56277ac.zip
mips: fix an off-by-one in dma_capable
This makes it match the generic version. Reported-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/dma-mapping.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
index 0d9418d264f9..5c334ac15945 100644
--- a/arch/mips/include/asm/dma-mapping.h
+++ b/arch/mips/include/asm/dma-mapping.h
@@ -22,7 +22,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
if (!dev->dma_mask)
return false;
- return addr + size <= *dev->dma_mask;
+ return addr + size - 1 <= *dev->dma_mask;
}
static inline void dma_mark_clean(void *addr, size_t size) {}
OpenPOWER on IntegriCloud