summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-05-01 15:24:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-09 09:53:06 +0200
commit6c965d69269a29487e5d0ab0de8692cbdf52b548 (patch)
tree7b8a945150c06d65fe6ae0ad29e8f2958c9ce9e9 /lib
parent35bc2e5d8e27fe3aca059ddf8e1ee993ce9ad785 (diff)
swiotlb: fix inversed DMA_ATTR_NO_WARN test
commit 892a0be43edd63e1cd228af3453a064e9e94f08e upstream. The result was printing the warning only when we were explicitly asked not to. Cc: stable@vger.kernel.org Fixes: 0176adb004065d6815a8e67946752df4cd947c5b "swiotlb: refactor coherent buffer allocation" Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/swiotlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 44f7eb408fdb..0331de0e9144 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -750,7 +750,7 @@ out_unmap:
swiotlb_tbl_unmap_single(dev, phys_addr, size, DMA_TO_DEVICE,
DMA_ATTR_SKIP_CPU_SYNC);
out_warn:
- if ((attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
+ if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
dev_warn(dev,
"swiotlb: coherent allocation failed, size=%zu\n",
size);