Skip to content

Commit 892a0be

Browse files
Michel DänzerChristoph Hellwig
authored andcommitted
swiotlb: fix inversed DMA_ATTR_NO_WARN test
The result was printing the warning only when we were explicitly asked not to. Cc: stable@vger.kernel.org Fixes: 0176adb "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>
1 parent 2d618bd commit 892a0be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/swiotlb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
737737
swiotlb_tbl_unmap_single(dev, phys_addr, size, DMA_TO_DEVICE,
738738
DMA_ATTR_SKIP_CPU_SYNC);
739739
out_warn:
740-
if ((attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
740+
if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
741741
dev_warn(dev,
742742
"swiotlb: coherent allocation failed, size=%zu\n",
743743
size);

0 commit comments

Comments
 (0)