Message ID | 1309384684-26415-1-git-send-email-vapier@gentoo.org |
---|---|
State | Accepted |
Commit | d2e8b911c0a0661d395ccac72156040702ac842d |
Delegated to: | Wolfgang Denk |
Headers | show |
Dear Mike Frysinger, In message <1309384684-26415-1-git-send-email-vapier@gentoo.org> you wrote: > Since panic() never returns, we should add an appropriate attribute to > let gcc improve optimization around it. > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> > --- > include/common.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Applied, thanks. Best regards, Wolfgang Denk
Dear Mike Frysinger, In message <20110726145430.3E637138EED4@gemini.denx.de> I wrote: > > In message <1309384684-26415-1-git-send-email-vapier@gentoo.org> you wrote: > > Since panic() never returns, we should add an appropriate attribute to > > let gcc improve optimization around it. > > > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> > > --- > > include/common.h | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > Applied, thanks. Arghh... this is causing build warnings for ALL boards: vsprintf.c: In function 'panic': vsprintf.c:730: warning: 'noreturn' function does return Please fix! [Did you not test this??] Best regards, Wolfgang Denk
On Jul 27, 2011, at 7:24 AM, Wolfgang Denk wrote: > Dear Mike Frysinger, > > In message <20110726145430.3E637138EED4@gemini.denx.de> I wrote: >> >> In message <1309384684-26415-1-git-send-email-vapier@gentoo.org> you wrote: >>> Since panic() never returns, we should add an appropriate attribute to >>> let gcc improve optimization around it. >>> >>> Signed-off-by: Mike Frysinger <vapier@gentoo.org> >>> --- >>> include/common.h | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> Applied, thanks. > > Arghh... this is causing build warnings for ALL boards: > > vsprintf.c: In function 'panic': > vsprintf.c:730: warning: 'noreturn' function does return > > > Please fix! http://patchwork.ozlabs.org/patch/106987/ - k
On Wed, Jul 27, 2011 at 05:24, Wolfgang Denk wrote: > Mike Frysinger wrote: >> Mike Frysinger wrote: >> > Since panic() never returns, we should add an appropriate attribute to >> > let gcc improve optimization around it. >> > >> > Signed-off-by: Mike Frysinger <vapier@gentoo.org> >> > --- >> > include/common.h | 2 +- >> > 1 files changed, 1 insertions(+), 1 deletions(-) >> >> Applied, thanks. > > Arghh... this is causing build warnings for ALL boards: no, it isnt all boards. if you look at the code, you see it's based on the CONFIG_PANIC_HANG define. and all my boards enable that, so i didnt see any warnings. -mike
Dear Mike Frysinger, In message <CAJaTeTqTEC2XHdbSeZHLWYhhSkdBXqDx1mFSBzuUaeWEyru=Zg@mail.gmail.com> you wrote: > > > Arghh... this is causing build warnings for ALL boards: > > no, it isnt all boards. if you look at the code, you see it's based > on the CONFIG_PANIC_HANG define. and all my boards enable that, so i > didnt see any warnings. That's why the documentation says: "Before sending the patch, you must run the MAKEALL script on your patched source tree and make sure that no errors or warnings are reported for any of the boards. ... Please also run MAKEALL for at least one other architecture than the one you made your modifications in." Best regards, Wolfgang Denk
diff --git a/include/common.h b/include/common.h index 1e21b7a..b59079b 100644 --- a/include/common.h +++ b/include/common.h @@ -651,7 +651,7 @@ int strict_strtoul(const char *cp, unsigned int base, unsigned long *res); unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base); long simple_strtol(const char *cp,char **endp,unsigned int base); void panic(const char *fmt, ...) - __attribute__ ((format (__printf__, 1, 2))); + __attribute__ ((format (__printf__, 1, 2), noreturn)); int sprintf(char * buf, const char *fmt, ...) __attribute__ ((format (__printf__, 2, 3))); int vsprintf(char *buf, const char *fmt, va_list args);
Since panic() never returns, we should add an appropriate attribute to let gcc improve optimization around it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> --- include/common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)