Re: [PATCH] asm-generic: bug: add unlikely() to BUG_ON()

2018-09-07 Thread Igor Stoppa
On 07/09/18 23:41, Arnd Bergmann wrote: Could you add a comment about -Wmaybe-uninitialized next to the definition? Otherwise that is easily lost. Also, I see that the file has two separate definitions of BUG_ON(), and the other one does have an unlikely() in it already. Can you change both

Re: [PATCH] asm-generic: bug: add unlikely() to BUG_ON()

2018-09-07 Thread Arnd Bergmann
On Fri, Sep 7, 2018 at 9:21 PM Igor Stoppa wrote: > > Add a hint to the compiler. > If BUG_ON() is used instead of BUG(), it means that probably the > preferred outcome is to not BUG(). > > The optimization is disabled, in case CONFIG_PROFILE_ANNOTATED_BRANCHES > is turned on. This sounds like a

[PATCH] asm-generic: bug: add unlikely() to BUG_ON()

2018-09-07 Thread Igor Stoppa
Add a hint to the compiler. If BUG_ON() is used instead of BUG(), it means that probably the preferred outcome is to not BUG(). The optimization is disabled, in case CONFIG_PROFILE_ANNOTATED_BRANCHES is turned on. Signed-off-by: Igor Stoppa Cc: Arnd Bergmann Cc: linux-a...@vger.kernel.org Cc: l