Re: [U-Boot] [PATCH v3] Add assert() for debug assertions

2011-09-09 Thread Wolfgang Denk
Dear Simon Glass, In message <1309376974-12943-1-git-send-email-...@chromium.org> you wrote: > assert() is like BUG_ON() but compiles to nothing unless DEBUG is defined. > This is useful when a condition is an error but a board reset is unlikely > to fix it, so it is better to soldier on in hope.

Re: [U-Boot] [PATCH v3] Add assert() for debug assertions

2011-09-09 Thread Simon Glass
Hi Mike / Wolfgang, On Thu, Sep 8, 2011 at 5:34 PM, Mike Frysinger wrote: > On Wednesday, September 07, 2011 18:29:16 Simon Glass wrote: >> On Wed, Jun 29, 2011 at 2:54 PM, Mike Frysinger wrote: >> > On Wednesday, June 29, 2011 17:01:23 Wolfgang Denk wrote: >> >> Mike Frysinger wrote: >> >> > do

Re: [U-Boot] [PATCH v3] Add assert() for debug assertions

2011-09-08 Thread Mike Frysinger
On Wednesday, September 07, 2011 18:29:16 Simon Glass wrote: > On Wed, Jun 29, 2011 at 2:54 PM, Mike Frysinger wrote: > > On Wednesday, June 29, 2011 17:01:23 Wolfgang Denk wrote: > >> Mike Frysinger wrote: > >> > do we really care about that when people are using #define DEBUG ? > >> > i'd say t

Re: [U-Boot] [PATCH v3] Add assert() for debug assertions

2011-09-07 Thread Simon Glass
Did this go anywhere? I will resend... - Simon On Wed, Jun 29, 2011 at 2:54 PM, Mike Frysinger wrote: > On Wednesday, June 29, 2011 17:01:23 Wolfgang Denk wrote: >> Mike Frysinger wrote: >> > do we really care about that when people are using #define DEBUG ?  i'd >> > say this is an unnecessary i

Re: [U-Boot] [PATCH v3] Add assert() for debug assertions

2011-06-29 Thread Mike Frysinger
On Wednesday, June 29, 2011 17:01:23 Wolfgang Denk wrote: > Mike Frysinger wrote: > > do we really care about that when people are using #define DEBUG ? i'd > > say this is an unnecessary indirection ... > > Yes, we do care about the memory footprint - no matter whether with or > without DEBUG.

Re: [U-Boot] [PATCH v3] Add assert() for debug assertions

2011-06-29 Thread Wolfgang Denk
Dear Mike Frysinger, In message <201106291643.32477.vap...@gentoo.org> you wrote: > > do we really care about that when people are using #define DEBUG ? i'd say > this is an unnecessary indirection ... Yes, we do care about the memory footprint - no matter whether with or without DEBUG. Best re

Re: [U-Boot] [PATCH v3] Add assert() for debug assertions

2011-06-29 Thread Mike Frysinger
On Wednesday, June 29, 2011 15:49:34 Simon Glass wrote: > - Use separate __assert_fail() function to reduce memory footprint do we really care about that when people are using #define DEBUG ? i'd say this is an unnecessary indirection ... -mike signature.asc Description: This is a digitally si

[U-Boot] [PATCH v3] Add assert() for debug assertions

2011-06-29 Thread Simon Glass
assert() is like BUG_ON() but compiles to nothing unless DEBUG is defined. This is useful when a condition is an error but a board reset is unlikely to fix it, so it is better to soldier on in hope. Assertion failures should be caught during development/test. It turns out that assert() is defined