]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/dma: fix an off-by-one in dma_capable
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Feb 2019 07:01:21 +0000 (08:01 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 Feb 2019 11:41:03 +0000 (22:41 +1100)
commitd4b0901c34720f8a4f7dc7dd3ecb74897ff57381
tree9bde6e9eed69e9a34714af83075687f9944f2c0c
parentbb21ef04c45103e2600608bace934b742a71eab9
powerpc/dma: fix an off-by-one in dma_capable

We need to compare the last byte in the dma range and not the one after it
for the bus_dma_mask, just like we do for the regular dma_mask.  Fix this
cleanly by merging the two comparisms into one.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/dma-direct.h