From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Peter Mamonov <pmamonov@gmail.com>,
Yann Sionneau <ysionneau@kalrayinc.com>,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/4] dma: don't allow override of dma_alloc/dma_free
Date: Mon, 8 Jan 2024 11:24:38 +0100 [thread overview]
Message-ID: <20240108102438.1318473-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240108102438.1318473-1-a.fatoum@pengutronix.de>
There are no architectures left defining their own dma_alloc/dma_free.
Instead, they define DMA_ALIGNMENT and use <dma.h>'s common
implementation.
This will be useful later on, as we can use DMA_ALIGNMENT for sanity
checking with CONFIG_DMA_DEBUG_API. Till then, ensure we get no new
architecture-specific definitions of dma_alloc/dma_free, by preventing
override of the <dma.h> implementation.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/dma.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/include/dma.h b/include/dma.h
index 266a7f323fa5..df9807b4f2e4 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -21,19 +21,15 @@
#define DMA_ALIGNMENT 32
#endif
-#ifndef dma_alloc
static inline void *dma_alloc(size_t size)
{
return xmemalign(DMA_ALIGNMENT, ALIGN(size, DMA_ALIGNMENT));
}
-#endif
-#ifndef dma_free
static inline void dma_free(void *mem)
{
free(mem);
}
-#endif
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
--
2.39.2
next prev parent reply other threads:[~2024-01-08 10:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 10:24 [PATCH 1/4] sandbox: set DMA_ALIGNMENT instead of defining dma_alloc Ahmad Fatoum
2024-01-08 10:24 ` [PATCH 2/4] kvx: " Ahmad Fatoum
2024-01-08 12:07 ` Yann Sionneau
2024-01-08 10:24 ` [PATCH 3/4] mips: " Ahmad Fatoum
2024-01-08 10:24 ` Ahmad Fatoum [this message]
2024-01-10 6:45 ` [PATCH 1/4] sandbox: " Sascha Hauer
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=20240108102438.1318473-4-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=pmamonov@gmail.com \
--cc=ysionneau@kalrayinc.com \
/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