Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752226AbbFQEhA (ORCPT ); Wed, 17 Jun 2015 00:37:00 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:47688 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750971AbbFQEg5 (ORCPT ); Wed, 17 Jun 2015 00:36:57 -0400 X-AuditID: cbfee68e-f79c56d000006efb-8d-5580f94c99d3 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 Cc: pankaj.m@samsung.com, Maninder Singh Subject: [RESUBMIT Patch 1/1] net: replace if()/BUG with BUG_ON Date: Wed, 17 Jun 2015 10:06:01 +0530 Message-id: <1434515761-14796-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 2.1.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRmVeSWpSXmKPExsWyRsSkStf3Z0OowY6VjBb/Zpxht5hzvoXF 4sT/I4wWp1wsLu+aw2ZxeH4bi8X/X69YLY4tELO492Yrk8X5v8dZLd5tOcLuwO2xZeVNJo+d s+6yeyzYVOrxft9VNo++LasYPT5vkvPY9OQtUwB7FJdNSmpOZllqkb5dAlfG5QcrmAuOslas ePqXrYHxIksXIyeHhICJxK+Xn6FsMYkL99azdTFycQgJLGWUuLP+IiNM0TOgOyAS0xklnn/d yAzhTGKS2LmqnR2kik1AT2LVrj0sIAkRgQuMEqu7FjB1MXJwMAs4SUz/qgdSIyxgL7Gp8zQr iM0ioCqx6fNrMJtXwF2i49pSVohtchLnj/8EWyAhsIxd4vXrxYwQDQIS3yYfYgGZKSEgK7Hp ADNEvaTEwRU3WCYwCi5gZFjFKJpakFxQnJReZKRXnJhbXJqXrpecn7uJERjsp/8969vBePOA 9SFGAQ5GJR7eFbcbQoVYE8uK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9rezcuqdKjX8aXmzQ PNBQFPbv7ncZdmtn3cfPX/xvjbix6X+KSZ1f837vdxs7tS86LssUer97mhJLcUaioRZzUXEi AFFFOq27AgAA 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: 929 Lines: 30 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/