From: "Michel Dänzer" <michel@daenzer.net>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Christoph Hellwig <hch@lst.de>
Cc: iommu@lists.linux-foundation.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] swiotlb: Fix inversed DMA_ATTR_NO_WARN test
Date: Tue, 1 May 2018 15:24:11 +0200 [thread overview]
Message-ID: <20180501132411.2311-1-michel@daenzer.net> (raw)
From: Michel Dänzer <michel.daenzer@amd.com>
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>
---
lib/swiotlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index c43ec2271469..e9ac21540628 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -750,7 +750,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);
--
2.17.0
next reply other threads:[~2018-05-01 13:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 13:24 Michel Dänzer [this message]
2018-05-02 9:49 ` [PATCH] swiotlb: Fix inversed DMA_ATTR_NO_WARN test Christian König
2018-05-02 12:18 ` Daniel Vetter
2018-05-02 12:41 ` Christoph Hellwig
2018-05-02 14:31 ` Michel Dänzer
2018-05-02 16:21 ` Christoph Hellwig
2018-05-02 16:59 ` Michel Dänzer
2018-05-22 13:13 ` Christian König
2018-05-25 8:41 ` Christoph Hellwig
2018-05-25 8:41 ` Michel Dänzer
2018-05-02 12:42 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180501132411.2311-1-michel@daenzer.net \
--to=michel@daenzer.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).