Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp511312ybb; Sat, 28 Mar 2020 04:22:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs2HnO27bQ1y4FQaP5nQc6acWcPOXu053rRWVS+G4mO8o0K1lwrWS65cRQmhKgGvvjBlhii X-Received: by 2002:a9d:82a:: with SMTP id 39mr2352114oty.82.1585394564710; Sat, 28 Mar 2020 04:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585394564; cv=none; d=google.com; s=arc-20160816; b=WyKBg+qqyHJuOcm8lZuZlg9rVAhsuDS04OMvXZqZ3wXsRubMUjvRewe48qy/gfRP7s OsRCPeuHZPGHOU4GBGnK9TKPUcdW6HtH4anlUCpKeJw/q5fiyK+tKj75jSLqoKRL4f2D aPgpStm10ICOxODKJw/oaFA4x5DcDN1YJUMpvf8K1MaOd+LvtnYAyf96MmtCnLK5TUXF 4qP/g6Ad0y8DK6I+7JGj1dF32mnH/uEL3t75k46VKRUeRJd0wci+lNco5FN2i4vHXukf 8lbSFkFpWh99U/VAHC9MN+wXQL30fjXoMAOro9C92Q/qBmcpXdMa17hZNxNS8+jKtwmM cc1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=BFoMFcPCyfiEXtCvcDF2+UjgSeng6P8QTvquBTH8rJs=; b=p28F2WN3Lq3ely6nF5KVs+7GrhEI/ttHqQNBU7fSrtofRhmhvqZQT8fjPsw/u435JO 4/uc7Bm01F53dM5rikKXAYzwR8WMOJJApjeirnUBs993vHkkyq4WF/0nWJO8DUpaeGo7 jc9cW7seYh7QmaX2fKbTK0RoyGJIWyG4lvae+g78/gX4Fc0GReHLAhMjCjV8Exd3EQDw CV8v2YtKFiYmJJoEBniwUyAvr8JZrs1x2zhmYcwFTijY9Nqaq+tLBVfqN0iBWip4Hn1i lJR4lHLFUr2kgRjD1jCpGadzXT+FnK21wCADksBjTz+aiF/3upqBvMVdnOLt1jZ4A0ed U4jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si3689706ota.85.2020.03.28.04.22.31; Sat, 28 Mar 2020 04:22:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726307AbgC1LWP (ORCPT + 99 others); Sat, 28 Mar 2020 07:22:15 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:55652 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbgC1LWP (ORCPT ); Sat, 28 Mar 2020 07:22:15 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jI9XY-000480-BR; Sat, 28 Mar 2020 12:22:12 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id A1A231040C1; Sat, 28 Mar 2020 12:22:11 +0100 (CET) From: Thomas Gleixner To: Jules Irenge , julia.lawall@lip6.fr Cc: boqun.feng@gmail.com, Armijn Hemel , Greg Kroah-Hartman , Muchun Song , open list Subject: Re: [PATCH 05/10] softirq: Replace BUG() after if statement with BUG_ON In-Reply-To: <20200327212358.5752-6-jbi.octave@gmail.com> References: <20200327212358.5752-1-jbi.octave@gmail.com> <20200327212358.5752-6-jbi.octave@gmail.com> Date: Sat, 28 Mar 2020 12:22:11 +0100 Message-ID: <871rpcyba4.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jules, Jules Irenge 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