diff options
| author | Michel Dänzer <michel.daenzer@amd.com> | 2018-05-01 09:24:11 -0400 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2018-05-02 08:48:55 -0400 |
| commit | 892a0be43edd63e1cd228af3453a064e9e94f08e (patch) | |
| tree | 16c2eccb0973ca293540b70f25a49059d5b872d4 /lib | |
| parent | 2d618bdf71635463a4aa4ad0fe46ec852292bc0c (diff) | |
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: 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>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/swiotlb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index fece57566d45..12fbaa445637 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
| @@ -737,7 +737,7 @@ out_unmap: | |||
| 737 | swiotlb_tbl_unmap_single(dev, phys_addr, size, DMA_TO_DEVICE, | 737 | swiotlb_tbl_unmap_single(dev, phys_addr, size, DMA_TO_DEVICE, |
| 738 | DMA_ATTR_SKIP_CPU_SYNC); | 738 | DMA_ATTR_SKIP_CPU_SYNC); |
| 739 | out_warn: | 739 | out_warn: |
| 740 | if ((attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) { | 740 | if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) { |
| 741 | dev_warn(dev, | 741 | dev_warn(dev, |
| 742 | "swiotlb: coherent allocation failed, size=%zu\n", | 742 | "swiotlb: coherent allocation failed, size=%zu\n", |
| 743 | size); | 743 | size); |
