image: Explicitly declare do_bdinfo()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 8 Nov 2021 18:03:38 +0000 (21:03 +0300)
committerTom Rini <trini@konsulko.com>
Mon, 15 Nov 2021 19:33:33 +0000 (14:33 -0500)
Compiler is not happy:

common/image-board.c: In function ‘boot_get_kbd’:
common/image-board.c:902:17: warning: implicit declaration of function ‘do_bdinfo’ [-Wimplicit-function-declaration]
  902 |                 do_bdinfo(NULL, 0, 0, NULL);
      |                 ^~~~~~~~~

Move the forward declaration to a header.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/image-board.c
boot/image.c
include/init.h

index ddf30c6..bf88171 100644 (file)
@@ -14,6 +14,7 @@
 #include <env.h>
 #include <fpga.h>
 #include <image.h>
+#include <init.h>
 #include <mapmem.h>
 #include <rtc.h>
 #include <watchdog.h>
index 992e729..f792f2a 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <lmb.h>
 #include <log.h>
 #include <malloc.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 
-#ifdef CONFIG_CMD_BDI
-extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc,
-                    char *const argv[]);
-#endif
-
 DECLARE_GLOBAL_DATA_PTR;
 
 /* Set this if we have less than 4 MB of malloc() space */
index c781789..f2cd46d 100644 (file)
@@ -332,6 +332,8 @@ void bdinfo_print_mhz(const char *name, unsigned long hz);
 /* Show arch-specific information for the 'bd' command */
 void arch_print_bdinfo(void);
 
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+
 #endif /* __ASSEMBLY__ */
 /* Put only stuff here that the assembler can digest */