Remove assert()
Get series with b4
b4 am 20171129030434.GO3587@bill-the-catVersions newest first
- v1 Latest0 of 5 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 5 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/5] Remove assert()
Quoted 51 lines · Masahiro Yamada
2017-11-29 11:30 GMT+09:00 Tom Rini <[email protected]>:
Quoted 50 lines · Masahiro Yamada
Quoted 48 lines
2017-11-29 10:42 GMT+09:00 Tom Rini <[email protected]>:
Quoted 40 lines · Masahiro Yamada
Quoted 17 lines
2017-11-28 23:52 GMT+09:00 Tom Rini <[email protected]>:
Quoted 12 lines · Masahiro Yamada
Quoted 10 lines
Buildman test passed.
Masahiro Yamada (5):
MoveCONFIG_PANIC_HANGtoKconfig
ARM: openrd: setCONFIG_LOGLEVELto 2
EnableCONFIG_PANIC_HANGfor boards withoutdo_reset()
treewide: convertassert()toBUG_ON()
Removeassert()Quoted 3 lines
Have you done a size check on this series? If not, I'll fire one up, thanks!
Quoted 6 lines
I think I did it correctly.
At least, I needed the following patch for openrd boards:
http://patchwork.ozlabs.org/patch/842106/Looks like the NAND core pull-request needs it, too.
So, in my testing (which is gcc-6 for everything thanks to Debian/9):
06: Removeassert()
arm: + clearfog peach-pi snow smdk5250 smdk5420turris_omniaspringomap3_evmpeach-pit(quoted diff) +5
-1-(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 760 bytes +(clearfog,turris_omnia) arm-linux-gnueabihf-ld.bfd: SPL image too big +(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 1080 bytes +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) arch/arm/mach-exynos/built-in.o: In function `clock_calc_best_scalar': +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) build/../arch/arm/mach-exynos/clock.c:1408: undefined reference to `panic' +(omap3_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 28 bytesAnd then a lot of platforms grow in size. Taking a harder peek,
BUG_ONis always set. However,assert()is only set when DEBUG is set. Now, I can certainly see an argument along the lines of that being fairly unexpected, and I don't know that I would disagree.Quoted 5 lines
After a very quick look over what git grep -l says, perhaps we want to introduce a new (default off) option to preserve the current behavior of
assert()inBUG_ON, as it looks like almost only kernel imported code is usingBUG_ON.Do you have an idea for the option name?
Quoted 5 lines
Quoted 1 line
ENABLE_BUG_ON_CHECKS?Do you mean CONFIG option?
i.e.CONFIG_ENABLE_BUG_ON_CHECKS
so we can turn it on/off globally?
Yes, a CONFIG option to turn it on/off.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171128/ad1b1fda/attachment.sig>