[PATCH 06/10] memory: move release_sdram_region into header
Ahmad Fatoum
a.fatoum at barebox.org
Mon Jan 5 00:03:38 PST 2026
To make it clear that release_sdram_region and release_region are the
same, move it into a header and give it a comment saying as much.
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
common/memory.c | 5 -----
include/memory.h | 6 +++++-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/common/memory.c b/common/memory.c
index 2cd6d29a8f2b..7dc7f40db7fc 100644
--- a/common/memory.c
+++ b/common/memory.c
@@ -352,11 +352,6 @@ struct resource *reserve_sdram_region(const char *name, resource_size_t start,
return res;
}
-int release_sdram_region(struct resource *res)
-{
- return release_region(res);
-}
-
void memory_bank_find_space(struct memory_bank *bank, resource_size_t *retstart,
resource_size_t *retend)
{
diff --git a/include/memory.h b/include/memory.h
index 6189a0f65c50..3475e9211b0c 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -63,7 +63,11 @@ static inline struct resource *request_sdram_region(const char *name,
struct resource *reserve_sdram_region(const char *name, resource_size_t start,
resource_size_t size);
-int release_sdram_region(struct resource *res);
+/* It's always fine to call release_region directly as well */
+static inline int release_sdram_region(struct resource *res)
+{
+ return release_region(res);
+}
void memory_bank_find_space(struct memory_bank *bank, resource_size_t *retstart,
resource_size_t *retend);
--
2.47.3
More information about the barebox
mailing list