Re: [U-Boot] [PATCH 4/5] treewide: convert assert() to BUG_ON()

2017-12-01 Thread Simon Glass
On 29 November 2017 at 07:17, Masahiro Yamada wrote: > Hi Simon, > > > 2017-11-29 22:08 GMT+09:00 Simon Glass : >> Hi Masahiro, >> >> On 28 November 2017 at 05:23, Masahiro Yamada >> wrote: >>> We do not need multiple ways to do the same thing. Instead of >>> assert(), use BUG_ON() from Linux.

Re: [U-Boot] [PATCH 4/5] treewide: convert assert() to BUG_ON()

2017-11-29 Thread Masahiro Yamada
Hi Simon, 2017-11-29 22:08 GMT+09:00 Simon Glass : > Hi Masahiro, > > On 28 November 2017 at 05:23, Masahiro Yamada > wrote: >> We do not need multiple ways to do the same thing. Instead of >> assert(), use BUG_ON() from Linux. The logic is opposite, but >> Coccinelle is of great help for such

Re: [U-Boot] [PATCH 4/5] treewide: convert assert() to BUG_ON()

2017-11-29 Thread Simon Glass
Hi Masahiro, On 28 November 2017 at 05:23, Masahiro Yamada wrote: > We do not need multiple ways to do the same thing. Instead of > assert(), use BUG_ON() from Linux. The logic is opposite, but > Coccinelle is of great help for such a conversion. We could > simply convert assert(x) to BUG_ON(!

[U-Boot] [PATCH 4/5] treewide: convert assert() to BUG_ON()

2017-11-28 Thread Masahiro Yamada
We do not need multiple ways to do the same thing. Instead of assert(), use BUG_ON() from Linux. The logic is opposite, but Coccinelle is of great help for such a conversion. We could simply convert assert(x) to BUG_ON(!x) for all expressions "x", but I did a bit better job by converting assert(