Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5045724imm; Tue, 11 Sep 2018 23:54:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbE2+xlSYo6RJiF4E9K+vivPfUkZZ5TlqJvIe1QSvgmf68LuBYyU0+cYiNZQiryCglSzhTI X-Received: by 2002:a63:5e45:: with SMTP id s66-v6mr478527pgb.151.1536735296390; Tue, 11 Sep 2018 23:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536735296; cv=none; d=google.com; s=arc-20160816; b=oE+/b/raicQROI9xL+/pbOPGPBSNUFpNxLnCOFmCYmkotYe6NkN69AUE9l7sPJ2wh7 WC73/wPKOv/y1t9m7cdExo+RDPzKFweSnBmZhIrYvqbSqZ+P2uujx89C8QxKkHCxShck 3mckRfLsKILzK5jvuHt39phoGUnZ8hu+QS1G4oBLSEqVM0xqMhI1jnYuYD6kF6aKl0SE 9nKb+mnJGXxSwACp1bwERt3oe7W31NPLqrTsr6nM1O9hgx2QSpHmSJsBK0eQR8vV1rAb ZNSaPXJrzpag1I0eEBJ5GOol+VWNvccttD0ZMt/hT3BtzFwm3zMF6a3/FXFFbFN6lNiE PV+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=Bu3eWq/7cddjZArHvA4paIbQnViIMVp/f/DXBv0pIOQ=; b=jQtsobB6d5UGJSKsSMSgo5rqW/pdoeHuRVF8jLanZYQcsDtRZcg0BRKxE/5swJEBdn OEeXJjF4bBHJHkvjND/ycg2HiqYaM+bdNIYolXB2SIq2o61x6zNGlac5OeBwgqywzVid 252q6Z3AXA3kPe34LI+mvB/5fs5ttSFMkIgQksmYtPcSbuMpyxr+4MrnERyujMvrLtWB tVbzI6eoxOZZ3IkCue3sSiBo9EfBpZXReSYjvS0cN+L7sGH/5/5xYz2XA4dWhJnLEEQ4 RHRncN6BwEtJj99FFwJ/ZW3EKcH7SCqo+ESAj6Jtv8t3/iY2qLRtfTS0qpTZWKLVZlKE dL9A== 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 9-v6si152979plf.374.2018.09.11.23.54.41; Tue, 11 Sep 2018 23:54:56 -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 S1727369AbeILL5Y (ORCPT + 99 others); Wed, 12 Sep 2018 07:57:24 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:57538 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbeILL5Y (ORCPT ); Wed, 12 Sep 2018 07:57:24 -0400 Received: from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net [74.93.104.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 417FC12DE57F3; Tue, 11 Sep 2018 23:54:18 -0700 (PDT) Date: Tue, 11 Sep 2018 23:54:17 -0700 (PDT) Message-Id: <20180911.235417.1481257495387934935.davem@davemloft.net> To: zhongjiang@huawei.com Cc: edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: ipv4: Use BUG_ON directly instead of a if condition followed by BUG From: David Miller In-Reply-To: <1536590282-23899-1-git-send-email-zhongjiang@huawei.com> References: <1536590282-23899-1-git-send-email-zhongjiang@huawei.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 11 Sep 2018 23:54:18 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: zhong jiang Date: Mon, 10 Sep 2018 22:38:02 +0800 > The if condition can be removed if we use BUG_ON directly. > The issule is detected with the help of Coccinelle. > > Signed-off-by: zhong jiang You keep asking if this is worthy to do. I think the most worthy thing to do is actually build test your patches.