Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 892a0be4 authored by Michel Dänzer's avatar Michel Dänzer Committed by Christoph Hellwig
Browse files

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: 0176adb0 "swiotlb: refactor
 coherent buffer allocation"
Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com&gt;.>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 2d618bdf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -737,7 +737,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
	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);