[PATCH v2] asm-generic: bug: unify hints for BUG_ON()

2018-09-11 Thread Igor Stoppa
If BUG_ON() is used instead of BUG(), it means that probably the preferred outcome is to not BUG(), therefore the condition tested should be unlikely(). However, when CONFIG_PROFILE_ANNOTATED_BRANCHES is enabled, the hint is disabled, to avoid generating false-positive warnings caused by -Wmaybe-u

Re: [PATCH v2] asm-generic: bug: unify hints for BUG_ON()

2018-09-10 Thread Igor Stoppa
On 10/09/18 15:16, Arnd Bergmann wrote: Acked-by: Arnd Bergmann I assume this will be included in a longer patch series rather than going through my asm-generic tree, right? sadly, no: this patch is just for the asm-generic tree I tried with the longer patch series, but it didn't work out

Re: [PATCH v2] asm-generic: bug: unify hints for BUG_ON()

2018-09-10 Thread Arnd Bergmann
On Sat, Sep 8, 2018 at 6:59 AM Igor Stoppa wrote: > > If BUG_ON() is used instead of BUG(), it means that probably the > preferred outcome is to not BUG(), therefore the condition tested should > be unlikely(). > > However, when CONFIG_PROFILE_ANNOTATED_BRANCHES is enabled, the hint is > disabled,

[PATCH v2] asm-generic: bug: unify hints for BUG_ON()

2018-09-07 Thread Igor Stoppa
If BUG_ON() is used instead of BUG(), it means that probably the preferred outcome is to not BUG(), therefore the condition tested should be unlikely(). However, when CONFIG_PROFILE_ANNOTATED_BRANCHES is enabled, the hint is disabled, to avoid generating false-positive warnings caused by -Wmaybe-u