Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [PATCH 05/10] softirq: Replace BUG() after if statement with BUG_ON | Date | Sat, 28 Mar 2020 12:22:11 +0100 |
| |
Jules,
Jules Irenge <jbi.octave@gmail.com> writes: > Coccinelle reports a warning tasklet_action_common() > > WARNING: Use BUG_ON instead of if condition followed by BUG > > To fix this, BUG() is replaced by BUG_ON() with the recommended > suggestion
Well, the suggestion is wrong to begin with. The suggestion should be:
Is this BUG() actually necessary and is this the only way to deal with this problem?
Only if that question can be answered with yes, then the recommended replacement is ok.
BUG() is the last resort and each and every instance wants to be looked at and not mechanically changed to some 'better' version of it.
Thanks,
tglx
| |