Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5467234imm; Wed, 12 Sep 2018 06:29:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYYvjRs1xDDIqLGxPmUsqbmoNjJ7zGHfBMcu0Tmhx7++YfD2NQqY1qqycnIw+dtMNUVIGEP X-Received: by 2002:a63:6a89:: with SMTP id f131-v6mr2372170pgc.165.1536758960292; Wed, 12 Sep 2018 06:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536758960; cv=none; d=google.com; s=arc-20160816; b=izD18+RsnWsAfD2t00c+PTKOKb1GQLE17FiILKKBk5uIGTO5rmy5xS2CzclbMEiVn2 4oAtIUj3RxdLjaxPghuno1sZ+FuRUyOPhR1N5z4DqbQCanM6jSoA+vvAEAnfq8sBB1EY 9LTLwD1740LOAt8zjP5RserqXe/Hsik1YR6dbawSOWTK7e/f6Ykl7uhJZ8LAb0cOpIzA +hqMxHFn7Xjxfa/yey53WqtF1GTXZ7Bv7J47J20s1mvof3Dnh3WF3dIreyqdm4+oz6H1 6Qa3t/ClhqQKmdTXMSsNmzegeYz7MCc17CxsJH2kBUCtnS4KTH+GitrB1dJ4/YHhbyBu OGDA== 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:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=UeYsNYPnCNozSn9mlvzEK9oL9kkFdadAGbt5CwMPUqc=; b=SPEPH08Yf3NQ0/NNxTMLMydzZ6TVWUz0nFSET/PXBR3CTBPxGLXFcmhESQ7wzfv1ne hZrBNM6ESPTqEL4KVvwQNLnGjg+YJTHZM7cY82JnXuUoRycayOQifFXLzMCsvtTGX8eX tYAHA6bcl1xbyKGmOPRaU+/BVOOjFnGaItBqRGO9oR+HQcJum7qTx6zH5VM3fyFXh11k q8D9CpmtuCP5K7S6/jeMBY34ZobaJsPQic3Er7J5qvz3U36WEuY7dWCxUE14wxU35mG0 igfNsBelQUpGmTJTiuEwGspQK9aIfLVzOrP8NAMDXzDB33n81pXL0GtXyY8hu0AI9xRk JH5g== 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 x13-v6si1106901pgx.19.2018.09.12.06.29.04; Wed, 12 Sep 2018 06:29:20 -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 S1727875AbeILS35 (ORCPT + 99 others); Wed, 12 Sep 2018 14:29:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12103 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727789AbeILS35 (ORCPT ); Wed, 12 Sep 2018 14:29:57 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 56547F8FF43C5; Wed, 12 Sep 2018 21:25:20 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.399.0; Wed, 12 Sep 2018 21:25:18 +0800 Message-ID: <5B9913BE.1040807@huawei.com> Date: Wed, 12 Sep 2018 21:25:18 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: David Miller CC: , , , , Subject: Re: [PATCH] net: ipv4: Use BUG_ON directly instead of a if condition followed by BUG References: <1536590282-23899-1-git-send-email-zhongjiang@huawei.com> <20180911.235417.1481257495387934935.davem@davemloft.net> In-Reply-To: <20180911.235417.1481257495387934935.davem@davemloft.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/9/12 14:54, David Miller wrote: > 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. I am sorry for that. :-[ Thanks, zhong jiang