* [PATCH v1 1/2] image: Fix typo in boot_get_kbd() @ 2021-11-05 20:09 Andy Shevchenko 2021-11-05 20:09 ` [PATCH v1 2/2] image: Explicitly declare do_bdinfo() Andy Shevchenko 2021-11-06 3:16 ` [PATCH v1 1/2] image: Fix typo in boot_get_kbd() Simon Glass 0 siblings, 2 replies; 8+ messages in thread From: Andy Shevchenko @ 2021-11-05 20:09 UTC (permalink / raw) To: Simon Glass, Ovidiu Panait, u-boot; +Cc: Andy Shevchenko After the commit 4ed37abc49c2 ("image: Remove ifdefs around image_setup_linux() el at"): common/image-board.c: In function ‘boot_get_kbd’: common/image-board.c:902:17: error: expected ‘)’ before ‘do_bdinfo’ 902 | do_bdinfo(NULL, 0, 0, NULL); | ^~~~~~~~~ common/image-board.c:901:12: note: to match this ‘(’ 901 | if (IS_ENABLED(CONFIG_CMD_BDI) | ^ common/image-board.c:906:1: error: expected expression before ‘}’ token 906 | } | ^ common/image-board.c:906:1: warning: control reaches end of non-void function [-Wreturn-type] 906 | } | ^ Fix obvious typo. Fixes: 4ed37abc49c2 ("image: Remove ifdefs around image_setup_linux() el at") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Revert "image: Partially revert too aggressive ifdeferry removal" This reverts commit 84631af9d0454ff8252c1aebb1e9c232b8077692. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- common/image-board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/image-board.c b/common/image-board.c index e7660352e96a..ddf30c67302e 100644 --- a/common/image-board.c +++ b/common/image-board.c @@ -898,7 +898,7 @@ int boot_get_kbd(struct lmb *lmb, struct bd_info **kbd) debug("## kernel board info at 0x%08lx\n", (ulong)*kbd); #if defined(DEBUG) - if (IS_ENABLED(CONFIG_CMD_BDI) + if (IS_ENABLED(CONFIG_CMD_BDI)) do_bdinfo(NULL, 0, 0, NULL); #endif -- 2.33.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 2/2] image: Explicitly declare do_bdinfo() 2021-11-05 20:09 [PATCH v1 1/2] image: Fix typo in boot_get_kbd() Andy Shevchenko @ 2021-11-05 20:09 ` Andy Shevchenko 2021-11-06 3:16 ` Simon Glass 2021-11-06 3:16 ` [PATCH v1 1/2] image: Fix typo in boot_get_kbd() Simon Glass 1 sibling, 1 reply; 8+ messages in thread From: Andy Shevchenko @ 2021-11-05 20:09 UTC (permalink / raw) To: Simon Glass, Ovidiu Panait, u-boot; +Cc: 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 <andriy.shevchenko@linux.intel.com> --- common/image.c | 5 ----- include/init.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/image.c b/common/image.c index 3fa60b582796..57bf86278149 100644 --- a/common/image.c +++ b/common/image.c @@ -29,11 +29,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 c781789e367e..37ca9905414f 100644 --- a/include/init.h +++ b/include/init.h @@ -332,6 +332,11 @@ void bdinfo_print_mhz(const char *name, unsigned long hz); /* Show arch-specific information for the 'bd' command */ void arch_print_bdinfo(void); +#if defined(CONFIG_CMD_BDI) +extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]); +#endif + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ -- 2.33.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/2] image: Explicitly declare do_bdinfo() 2021-11-05 20:09 ` [PATCH v1 2/2] image: Explicitly declare do_bdinfo() Andy Shevchenko @ 2021-11-06 3:16 ` Simon Glass 2021-11-06 7:58 ` Andy Shevchenko 0 siblings, 1 reply; 8+ messages in thread From: Simon Glass @ 2021-11-06 3:16 UTC (permalink / raw) To: Andy Shevchenko; +Cc: Ovidiu Panait, u-boot Hi Andy, On Fri, 5 Nov 2021 at 14:10, Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com> > --- > common/image.c | 5 ----- > include/init.h | 5 +++++ > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/common/image.c b/common/image.c > index 3fa60b582796..57bf86278149 100644 > --- a/common/image.c > +++ b/common/image.c > @@ -29,11 +29,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 c781789e367e..37ca9905414f 100644 > --- a/include/init.h > +++ b/include/init.h > @@ -332,6 +332,11 @@ void bdinfo_print_mhz(const char *name, unsigned long hz); > /* Show arch-specific information for the 'bd' command */ > void arch_print_bdinfo(void); > > +#if defined(CONFIG_CMD_BDI) > +extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, > + char *const argv[]); > +#endif Can we drop the #if..#endif? > + > #endif /* __ASSEMBLY__ */ > /* Put only stuff here that the assembler can digest */ > > -- > 2.33.0 > Regards, SImon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/2] image: Explicitly declare do_bdinfo() 2021-11-06 3:16 ` Simon Glass @ 2021-11-06 7:58 ` Andy Shevchenko 2021-11-07 16:43 ` Simon Glass 0 siblings, 1 reply; 8+ messages in thread From: Andy Shevchenko @ 2021-11-06 7:58 UTC (permalink / raw) To: Simon Glass; +Cc: Andy Shevchenko, Ovidiu Panait, u-boot On Saturday, November 6, 2021, Simon Glass <sjg@chromium.org> wrote: > Hi Andy, > > On Fri, 5 Nov 2021 at 14:10, Andy Shevchenko > <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com> > > --- > > common/image.c | 5 ----- > > include/init.h | 5 +++++ > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/common/image.c b/common/image.c > > index 3fa60b582796..57bf86278149 100644 > > --- a/common/image.c > > +++ b/common/image.c > > @@ -29,11 +29,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 c781789e367e..37ca9905414f 100644 > > --- a/include/init.h > > +++ b/include/init.h > > @@ -332,6 +332,11 @@ void bdinfo_print_mhz(const char *name, unsigned > long hz); > > /* Show arch-specific information for the 'bd' command */ > > void arch_print_bdinfo(void); > > > > +#if defined(CONFIG_CMD_BDI) > > +extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, > > + char *const argv[]); > > +#endif > > Can we drop the #if..#endif? No, AFAICT, but you can do it later somehow. Currently this fixes a warning. > > > + > > #endif /* __ASSEMBLY__ */ > > /* Put only stuff here that the assembler can digest */ > > > > -- > > 2.33.0 > > > > Regards, > SImon > -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/2] image: Explicitly declare do_bdinfo() 2021-11-06 7:58 ` Andy Shevchenko @ 2021-11-07 16:43 ` Simon Glass 2021-11-08 8:37 ` Andy Shevchenko 0 siblings, 1 reply; 8+ messages in thread From: Simon Glass @ 2021-11-07 16:43 UTC (permalink / raw) To: Andy Shevchenko; +Cc: Andy Shevchenko, Ovidiu Panait, u-boot Hi Andy, On Sat, 6 Nov 2021 at 01:59, Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > > > On Saturday, November 6, 2021, Simon Glass <sjg@chromium.org> wrote: >> >> Hi Andy, >> >> On Fri, 5 Nov 2021 at 14:10, Andy Shevchenko >> <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com> >> > --- >> > common/image.c | 5 ----- >> > include/init.h | 5 +++++ >> > 2 files changed, 5 insertions(+), 5 deletions(-) >> > >> > diff --git a/common/image.c b/common/image.c >> > index 3fa60b582796..57bf86278149 100644 >> > --- a/common/image.c >> > +++ b/common/image.c >> > @@ -29,11 +29,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 c781789e367e..37ca9905414f 100644 >> > --- a/include/init.h >> > +++ b/include/init.h >> > @@ -332,6 +332,11 @@ void bdinfo_print_mhz(const char *name, unsigned long hz); >> > /* Show arch-specific information for the 'bd' command */ >> > void arch_print_bdinfo(void); >> > >> > +#if defined(CONFIG_CMD_BDI) >> > +extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, >> > + char *const argv[]); >> > +#endif >> >> Can we drop the #if..#endif? > > > No, AFAICT, but you can do it later somehow. Currently this fixes a warning. I mean drop the #if line and the #endif line. We try to avoid this sort that things like IS_ENABLED() work. Also please drop the 'extern'. > >> >> >> > + >> > #endif /* __ASSEMBLY__ */ >> > /* Put only stuff here that the assembler can digest */ >> > >> > -- >> > 2.33.0 >> > >> Regards, SImon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/2] image: Explicitly declare do_bdinfo() 2021-11-07 16:43 ` Simon Glass @ 2021-11-08 8:37 ` Andy Shevchenko 2021-11-08 15:58 ` Simon Glass 0 siblings, 1 reply; 8+ messages in thread From: Andy Shevchenko @ 2021-11-08 8:37 UTC (permalink / raw) To: Simon Glass; +Cc: Andy Shevchenko, Ovidiu Panait, u-boot On Sun, Nov 7, 2021 at 6:43 PM Simon Glass <sjg@chromium.org> wrote: > On Sat, 6 Nov 2021 at 01:59, Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > On Saturday, November 6, 2021, Simon Glass <sjg@chromium.org> wrote: > >> On Fri, 5 Nov 2021 at 14:10, Andy Shevchenko > >> <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com> > >> > --- > >> > common/image.c | 5 ----- > >> > include/init.h | 5 +++++ > >> > 2 files changed, 5 insertions(+), 5 deletions(-) > >> > > >> > diff --git a/common/image.c b/common/image.c > >> > index 3fa60b582796..57bf86278149 100644 > >> > --- a/common/image.c > >> > +++ b/common/image.c > >> > @@ -29,11 +29,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 c781789e367e..37ca9905414f 100644 > >> > --- a/include/init.h > >> > +++ b/include/init.h > >> > @@ -332,6 +332,11 @@ void bdinfo_print_mhz(const char *name, unsigned long hz); > >> > /* Show arch-specific information for the 'bd' command */ > >> > void arch_print_bdinfo(void); > >> > > >> > +#if defined(CONFIG_CMD_BDI) > >> > +extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, > >> > + char *const argv[]); > >> > +#endif > >> > >> Can we drop the #if..#endif? > > > > > > No, AFAICT, but you can do it later somehow. Currently this fixes a warning. > > I mean drop the #if line and the #endif line. And we will have a dangling prototype when !CONFIG_CMD_BDI ? Is it okay? > We try to avoid this > sort that things like IS_ENABLED() work. -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/2] image: Explicitly declare do_bdinfo() 2021-11-08 8:37 ` Andy Shevchenko @ 2021-11-08 15:58 ` Simon Glass 0 siblings, 0 replies; 8+ messages in thread From: Simon Glass @ 2021-11-08 15:58 UTC (permalink / raw) To: Andy Shevchenko; +Cc: Andy Shevchenko, Ovidiu Panait, u-boot Hi Andy, On Mon, 8 Nov 2021 at 01:38, Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > On Sun, Nov 7, 2021 at 6:43 PM Simon Glass <sjg@chromium.org> wrote: > > On Sat, 6 Nov 2021 at 01:59, Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > > On Saturday, November 6, 2021, Simon Glass <sjg@chromium.org> wrote: > > >> On Fri, 5 Nov 2021 at 14:10, Andy Shevchenko > > >> <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com> > > >> > --- > > >> > common/image.c | 5 ----- > > >> > include/init.h | 5 +++++ > > >> > 2 files changed, 5 insertions(+), 5 deletions(-) > > >> > > > >> > diff --git a/common/image.c b/common/image.c > > >> > index 3fa60b582796..57bf86278149 100644 > > >> > --- a/common/image.c > > >> > +++ b/common/image.c > > >> > @@ -29,11 +29,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 c781789e367e..37ca9905414f 100644 > > >> > --- a/include/init.h > > >> > +++ b/include/init.h > > >> > @@ -332,6 +332,11 @@ void bdinfo_print_mhz(const char *name, unsigned long hz); > > >> > /* Show arch-specific information for the 'bd' command */ > > >> > void arch_print_bdinfo(void); > > >> > > > >> > +#if defined(CONFIG_CMD_BDI) > > >> > +extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, > > >> > + char *const argv[]); > > >> > +#endif > > >> > > >> Can we drop the #if..#endif? > > > > > > > > > No, AFAICT, but you can do it later somehow. Currently this fixes a warning. > > > > I mean drop the #if line and the #endif line. > > And we will have a dangling prototype when !CONFIG_CMD_BDI ? > Is it okay? Do you mean one that isn't used? Yes that is fine. > > > We try to avoid this > > sort that things like IS_ENABLED() work. Regards, Simon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/2] image: Fix typo in boot_get_kbd() 2021-11-05 20:09 [PATCH v1 1/2] image: Fix typo in boot_get_kbd() Andy Shevchenko 2021-11-05 20:09 ` [PATCH v1 2/2] image: Explicitly declare do_bdinfo() Andy Shevchenko @ 2021-11-06 3:16 ` Simon Glass 1 sibling, 0 replies; 8+ messages in thread From: Simon Glass @ 2021-11-06 3:16 UTC (permalink / raw) To: Andy Shevchenko; +Cc: Ovidiu Panait, u-boot On Fri, 5 Nov 2021 at 14:10, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > After the commit 4ed37abc49c2 ("image: Remove ifdefs around > image_setup_linux() el at"): > > common/image-board.c: In function ‘boot_get_kbd’: > common/image-board.c:902:17: error: expected ‘)’ before ‘do_bdinfo’ > 902 | do_bdinfo(NULL, 0, 0, NULL); > | ^~~~~~~~~ > common/image-board.c:901:12: note: to match this ‘(’ > 901 | if (IS_ENABLED(CONFIG_CMD_BDI) > | ^ > common/image-board.c:906:1: error: expected expression before ‘}’ token > 906 | } > | ^ > common/image-board.c:906:1: warning: control reaches end of non-void function [-Wreturn-type] > 906 | } > | ^ > > Fix obvious typo. > > Fixes: 4ed37abc49c2 ("image: Remove ifdefs around image_setup_linux() el at") > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Revert "image: Partially revert too aggressive ifdeferry removal" > > This reverts commit 84631af9d0454ff8252c1aebb1e9c232b8077692. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > common/image-board.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass <sjg@chromium.org> ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-11-08 15:58 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-11-05 20:09 [PATCH v1 1/2] image: Fix typo in boot_get_kbd() Andy Shevchenko 2021-11-05 20:09 ` [PATCH v1 2/2] image: Explicitly declare do_bdinfo() Andy Shevchenko 2021-11-06 3:16 ` Simon Glass 2021-11-06 7:58 ` Andy Shevchenko 2021-11-07 16:43 ` Simon Glass 2021-11-08 8:37 ` Andy Shevchenko 2021-11-08 15:58 ` Simon Glass 2021-11-06 3:16 ` [PATCH v1 1/2] image: Fix typo in boot_get_kbd() Simon Glass
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.