]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set
authorTom Rini <trini@konsulko.com>
Mon, 7 Dec 2015 13:23:29 +0000 (08:23 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 7 Dec 2015 13:35:23 +0000 (08:35 -0500)
Now that we may compile (but not link) code calling fixup_cmdtable when
this is not set, we need to always have the declaration available.  We
should also make sure that anyone calling the function includes
<command.h> as that's where the function declaration is.

Signed-off-by: Tom Rini <trini@konsulko.com>
common/board_r.c
include/command.h
test/dm/cmd_dm.c

index 5af32dd65be2632d3df7b8b1fd5cbc4126007929..75ee43e2d76eab0a44fa79db9d78085aff257feb 100644 (file)
@@ -15,6 +15,7 @@
 #if defined(CONFIG_CMD_BEDBUG)
 #include <bedbug/type.h>
 #endif
+#include <command.h>
 #include <console.h>
 #ifdef CONFIG_HAS_DATAFLASH
 #include <dataflash.h>
index 6c04cd9007a5ea1bdc05b0580355bb62c0c5fac2..2ae9b6c2e6e582eef50e6d115ed66b65ea9fe053 100644 (file)
@@ -142,6 +142,7 @@ enum command_ret_t {
 int cmd_process(int flag, int argc, char * const argv[],
                               int *repeatable, unsigned long *ticks);
 
+void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
 #endif /* __ASSEMBLY__ */
 
 /*
@@ -179,8 +180,4 @@ int cmd_process(int flag, int argc, char * const argv[],
 #define U_BOOT_CMD(_name, _maxargs, _rep, _cmd, _usage, _help)         \
        U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, NULL)
 
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
-void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
-#endif
-
 #endif /* __COMMAND_H */
index b6e71091497c3a68d92c92c4a3037337e76dfb3d..a3c5971a8b1466ce773fe634f2076f79c65bd0cf 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <malloc.h>
 #include <mapmem.h>