On 3 December 2017 at 20:37, Masahiro Yamada <[email protected]> wrote: > BUG() and BUG_ON() are generally used to test a condition that should > never happen. If it does, it is a bug. > > Linux always enables them, but doing so in U-Boot causes image size > problems on some platforms. Introduce CONFIG_ENABLE_BUG_CHECKS to > make them no-op by default. Platforms without image size constraint > are free to enable this option to catch bugs easily. > > Likewise, silence WARN_ON() unless this option is enabled. > > Suggested-by: Tom Rini <[email protected]> > Signed-off-by: Masahiro Yamada <[email protected]> > --- > > Changes in v2: > - Newly added > > include/linux/bug.h | 9 ++++++++- > lib/Kconfig | 7 +++++++ > 2 files changed, 15 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <[email protected]> _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

