[U-Boot] [RFC PATCH 08/14] dm: Disable dm_warn() in SPL
Simon Glass
sjg at chromium.org
Wed Sep 24 01:30:02 CEST 2014
Since this function can use up quite a bit of space for its strings, disable
it by default in SPL. Use CONFIG_DM_WARN to re-enable it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
include/config_defaults.h | 1 +
include/dm/util.h | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/config_defaults.h b/include/config_defaults.h
index f1b225d..4d49315 100644
--- a/include/config_defaults.h
+++ b/include/config_defaults.h
@@ -21,6 +21,7 @@
#define CONFIG_PARTITIONS 1
#ifndef CONFIG_SPL_BUILD
+#define CONFIG_DM_WARN
#define CONFIG_DM_DEVICE_REMOVE
#define CONFIG_DM_STDIO
#endif
diff --git a/include/dm/util.h b/include/dm/util.h
index 8be64a9..dee8fa6 100644
--- a/include/dm/util.h
+++ b/include/dm/util.h
@@ -6,7 +6,13 @@
#ifndef __DM_UTIL_H
+#ifdef CONFIG_DM_WARN
void dm_warn(const char *fmt, ...);
+#else
+static inline void dm_warn(const char *fmt, ...)
+{
+}
+#endif
#ifdef DEBUG
void dm_dbg(const char *fmt, ...);
--
2.1.0.rc2.206.gedb03e5
More information about the U-Boot
mailing list