]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
dm: include <dm/util.h> from drivers/core/util.c
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 22 Jun 2017 07:50:01 +0000 (16:50 +0900)
committerSimon Glass <sjg@chromium.org>
Tue, 11 Jul 2017 16:08:20 +0000 (10:08 -0600)
Fix sparse warnings "... was not declared. Should it be static?"

Also, fix redefinition of dm_warn/dm_dbg.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/core/util.c

index 5ceac8bbb15b9572a9e8e76ebcd3b9794550bcbc..2e232d57a14fac2db666586beb82796db241c2d1 100644 (file)
@@ -5,9 +5,11 @@
  */
 
 #include <common.h>
+#include <dm/util.h>
 #include <libfdt.h>
 #include <vsprintf.h>
 
+#ifdef CONFIG_DM_WARN
 void dm_warn(const char *fmt, ...)
 {
        va_list args;
@@ -16,7 +18,9 @@ void dm_warn(const char *fmt, ...)
        vprintf(fmt, args);
        va_end(args);
 }
+#endif
 
+#ifdef DEBUG
 void dm_dbg(const char *fmt, ...)
 {
        va_list args;
@@ -25,6 +29,7 @@ void dm_dbg(const char *fmt, ...)
        vprintf(fmt, args);
        va_end(args);
 }
+#endif
 
 int list_count_items(struct list_head *head)
 {