Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753870AbbFOFFc (ORCPT ); Mon, 15 Jun 2015 01:05:32 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:33683 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbbFOFFY (ORCPT ); Mon, 15 Jun 2015 01:05:24 -0400 X-AuditID: cbfee691-f79ca6d00000456a-4d-557e5d122dfe From: Maninder Singh To: davem@davemloft.net, willemb@google.com, dborkman@redhat.com, al.drozdov@gmail.com, viro@zeniv.linux.org.uk, eyal.birger@gmail.com, mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] net: replace if()/BUG with BUG_ON() Date: Mon, 15 Jun 2015 10:35:05 +0530 Message-id: <"000201d0a728$e1928230$a4b78690$@s"@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: AdCnKNfkjhviTjlmSZOAHrMgpjt5Dw== Content-language: en-us X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNIsWRmVeSWpSXmKPExsWyRsSkWlcoti7UoO0Qn8W/GWfYLeacb2Gx OPH/CKPFKReLy7vmsFn8//WK1eLYAjGL83+Ps1q823KE3YHTY8vKm0weO2fdZfdYsKnU4/2+ q2wenzfJeWx68pYpgC2KyyYlNSezLLVI3y6BK6PtoXzBEdaK/70N7A2MF1i6GDk4JARMJBZe 9Opi5AQyxSQu3FvP1sXIxSEksJRR4l1TFwtEwkRi+9EWRojEIkaJLzP/sEM4nxglJq3YywZS xSagJ7Fq1x4WkISIwAVGidVdC5hAEsICFhL/33aygtgsAqoSX2dNB1vNK2Ar8Wy5PUiYV0BQ 4sfke2DbmAW0JNbvPM4EYctLbF7zlhniUnWJR391QcIiQKvad31lgygRl5j04CE7xKHX2CV2 vvaC2CQg8W3yIagnZSU2HWCGKJGUOLjiBssER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iSbnA5NQXkm8obGJuamxqaWJhYmZpZI478l8n1AhgfTEktTs1NSC1CKYPiYOTqkGxk0r Pu/NuJdoN39Xi0vLk+PBSx8f5T7w5OCGnHjHOaE9XKFZ70q4cwqarv1/oVMU7Zgx2dptreON bBmp9/sF9vbc+ffJgK9rv3hW/Wpfn51L/V4Hp/Yd+SywaU7fVYu3Xh1Fa1hzg2PjzLlXPF5w N/TrRbZZRfY/eG71mDZHL5jyqLc6rK1glhJLcUaioRZzUXEiAIWVj3YKAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 927 Lines: 31 Use BUG_ON(condition) instead of if(condition)/BUG() Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- net/packet/af_packet.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index b5989c6..c91d405 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -547,8 +547,7 @@ static void prb_setup_retire_blk_timer(struct packet_sock *po, int tx_ring) { struct tpacket_kbdq_core *pkc; - if (tx_ring) - BUG(); + BUG_ON(tx_ring); pkc = tx_ring ? GET_PBDQC_FROM_RB(&po->tx_ring) : GET_PBDQC_FROM_RB(&po->rx_ring); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/