diff mbox

[U-Boot,v6,5/6] Make export interface support CONFIG_SYS_MALLOC_SIMPLE

Message ID 1425394982-16196-6-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass March 3, 2015, 3:03 p.m. UTC
When CONFIG_SYS_MALLOC_SIMPLE is defined, free() is a static inline. Make
sure that the export interface still builds in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v6: None
Changes in v5: None
Changes in v4:
- Add new patch to make the export interface support CONFIG_SYS_MALLOC_SIMPLE

Changes in v3: None
Changes in v2: None

 include/_exports.h | 2 ++
 include/exports.h  | 2 ++
 2 files changed, 4 insertions(+)

Comments

Tom Rini March 4, 2015, 10:16 p.m. UTC | #1
On Tue, Mar 03, 2015 at 08:03:01AM -0700, Simon Glass wrote:

> When CONFIG_SYS_MALLOC_SIMPLE is defined, free() is a static inline. Make
> sure that the export interface still builds in this case.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/include/_exports.h b/include/_exports.h
index 5944703..279017e 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -23,7 +23,9 @@ 
 	EXPORT_FUNC(dummy, void, free_hdlr, void)
 #endif
 	EXPORT_FUNC(malloc, void *, malloc, size_t)
+#ifndef CONFIG_SYS_MALLOC_SIMPLE
 	EXPORT_FUNC(free, void, free, void *)
+#endif
 	EXPORT_FUNC(udelay, void, udelay, unsigned long)
 	EXPORT_FUNC(get_timer, unsigned long, get_timer, unsigned long)
 	EXPORT_FUNC(vprintf, int, vprintf, const char *, va_list)
diff --git a/include/exports.h b/include/exports.h
index 205affe..1a01e43 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -15,7 +15,9 @@  int printf(const char* fmt, ...);
 void install_hdlr(int, interrupt_handler_t, void*);
 void free_hdlr(int);
 void *malloc(size_t);
+#ifndef CONFIG_SYS_MALLOC_SIMPLE
 void free(void*);
+#endif
 void __udelay(unsigned long);
 unsigned long get_timer(unsigned long);
 int vprintf(const char *, va_list);