From: Dmitry Baryshkov <dbaryshkov@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 1/3] Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE
Date: Fri, 18 Jul 2008 13:29:57 +0400 [thread overview]
Message-ID: <488062a0.1d624e0a.3289.09b9@mx.google.com> (raw)
In-Reply-To: <20080718092810.GA2423@doriath.ww600.siemens.net>
Don't rewrite successfull allocation return values
in case the memory was marked with DMA_MEMORY_EXCLUSIVE.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
---
kernel/dma-coherent.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/kernel/dma-coherent.c b/kernel/dma-coherent.c
index 89a554c..56dff5c 100644
--- a/kernel/dma-coherent.c
+++ b/kernel/dma-coherent.c
@@ -105,8 +105,7 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size,
*dma_handle = mem->device_base + (page << PAGE_SHIFT);
*ret = mem->virt_base + (page << PAGE_SHIFT);
memset(*ret, 0, size);
- }
- if (mem->flags & DMA_MEMORY_EXCLUSIVE)
+ } else if (mem->flags & DMA_MEMORY_EXCLUSIVE)
*ret = NULL;
}
return (mem != NULL);
--
1.5.6.2
--
With best wishes
Dmitry
prev parent reply other threads:[~2008-07-18 9:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 9:28 [PATCH 0/3] Generic dma-coherent updates Dmitry Baryshkov
2008-07-18 9:29 ` Dmitry Baryshkov [this message]
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=488062a0.1d624e0a.3289.09b9@mx.google.com \
--to=dbaryshkov@gmail.com \
--cc=hpa@zytor.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®