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

swiotlb: fix inversed DMA_ATTR_NO_WARN test

The result was printing the warning only when we were explicitly asked
not to.

Fixes: 0176adb0 "swiotlb: refactor
 coherent buffer allocation"
Signed-off-by: Michel Dänzer's avatarMichel Dänzer <>
Reviewed-by: Christian König <>.
Signed-off-by: default avatarChristoph Hellwig <>
parent 2d618bdf
......@@ -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,
if ((attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
"swiotlb: coherent allocation failed, size=%zu\n",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment