From 4b32531be236bbd9ca60f26447511f79e214f79e Mon Sep 17 00:00:00 2001 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Mon, 8 Nov 2021 21:03:38 +0300 Subject: [PATCH] image: Explicitly declare do_bdinfo() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 1 + boot/image.c | 6 +----- include/init.h | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/boot/image-board.c b/boot/image-board.c index ddf30c6730..bf8817165c 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -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> diff --git a/boot/image.c b/boot/image.c index 992e72991d..f792f2aa69 100644 --- a/boot/image.c +++ b/boot/image.c @@ -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> @@ -29,11 +30,6 @@ #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 */ diff --git a/include/init.h b/include/init.h index c781789e36..f2cd46dead 100644 --- a/include/init.h +++ b/include/init.h @@ -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 */ -- 2.39.5