[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <871rpcyba4.fsf@nanos.tec.linutronix.de>
Date: Sat, 28 Mar 2020 12:22:11 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Jules Irenge <jbi.octave@...il.com>, julia.lawall@...6.fr
Cc: boqun.feng@...il.com, Armijn Hemel <armijn@...ldur.nl>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Muchun Song <smuchun@...il.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 05/10] softirq: Replace BUG() after if statement with BUG_ON
Jules,
Jules Irenge <jbi.octave@...il.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
Powered by blists - more mailing lists