diff mbox

[U-Boot,v3,09/14] dm: Disable dm_warn() in SPL

Message ID 1415665015-12651-10-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Nov. 11, 2014, 12:16 a.m. UTC
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@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
---

Changes in v3: None
Changes in v2: None

 include/config_defaults.h | 1 +
 include/dm/util.h         | 6 ++++++
 2 files changed, 7 insertions(+)

Comments

Simon Glass Nov. 23, 2014, 12:59 p.m. UTC | #1
On 11 November 2014 at 01:16, Simon Glass <sjg@chromium.org> wrote:
> 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@chromium.org>
> Reviewed-by: Tom Rini <trini@ti.com>
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  include/config_defaults.h | 1 +
>  include/dm/util.h         | 6 ++++++
>  2 files changed, 7 insertions(+)

Applied to u-boot-dm.
diff mbox

Patch

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 6ac3a38..0cec17b 100644
--- a/include/dm/util.h
+++ b/include/dm/util.h
@@ -7,7 +7,13 @@ 
 #ifndef __DM_UTIL_H
 #define __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, ...);