Skip to content

assert() is almost used in the same way as BUG_ON(), except:

Tom Rini u-boot 1 version New

Get series with b4
b4 am 20180128160409.GJ20149@bill-the-cat

Versions newest first

  1. v3 Latest0 of 6 patches 0 repliesNew

Patches in v3 No applies recorded yet

None of the 6 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [U-Boot] [PATCH v3 0/6] assert() is almost used in the same way as BUG_ON(), except:
Quoted 11 lines · Masahiro Yamada

- the logic is opposite
- currently, assert() is compiled only when DEBUG is defined

Coccinelle can easily convert assert() to BUG_ON().

A problem is it would grow the image size.
In v2, I introduced a new CONFIG option to allow to disable it.

In v3, it is default 'y'. I disabled it only for openrd boards.

Quoted 8 lines

Masahiro Yamada (6):
Enable CONFIG_PANIC_HANG for boards without do_reset()
usb: xhci: return ERR_PTR(-ETIMEDOUT) at the end of
xhci_wait_for_event()
Introduce CONFIG_BUG_CHECKS to allow to disable BUG{_ON} and WARN_ON
ARM: openrd: disable CONFIG_BUG_CHECKS
treewide: convert assert() to BUG_ON()
Remove assert()

So, as much as I want this change in theory, I'm not sure what to do with this series. First, there's the USB side (and other I'm sure less visible cases) where this does change behavior a bit. But second, and harder to deal with, is that this totally breaks all of our test/py code (make tests hangs) and I haven't come up with a good fix. I think some of these changes can certainly be brought in.

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/20180128/fc23c871/attachment.sig>