Re: [PATCH v2 2/2] image: Explicitly declare do_bdinfo()

2021-11-16 Thread Tom Rini
On Mon, Nov 08, 2021 at 09:03:38PM +0300, Andy Shevchenko wrote:

> 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 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v2 2/2] image: Explicitly declare do_bdinfo()

2021-11-08 Thread Simon Glass
On Mon, 8 Nov 2021 at 11:05, Andy Shevchenko
 wrote:
>
> 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 
> ---
> v2: dropped ifdeffery and extern (Simon), included header to the users
>  common/image-board.c | 1 +
>  common/image.c   | 6 +-
>  include/init.h   | 2 ++
>  3 files changed, 4 insertions(+), 5 deletions(-)
>

Reviewed-by: Simon Glass 


[PATCH v2 2/2] image: Explicitly declare do_bdinfo()

2021-11-08 Thread Andy Shevchenko
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 
---
v2: dropped ifdeffery and extern (Simon), included header to the users
 common/image-board.c | 1 +
 common/image.c   | 6 +-
 include/init.h   | 2 ++
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/common/image-board.c b/common/image-board.c
index ddf30c67302e..bf8817165cab 100644
--- a/common/image-board.c
+++ b/common/image-board.c
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/common/image.c b/common/image.c
index 3fa60b582796..5ef15c45d286 100644
--- a/common/image.c
+++ b/common/image.c
@@ -9,6 +9,7 @@
 #ifndef USE_HOSTCC
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -29,11 +30,6 @@
 #include 
 #include 
 
-#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 c781789e367e..f2cd46dead04 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.33.0