All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESUBMIT Patch 1/1] net: replace if()/BUG with BUG_ON
@ 2015-06-17  4:36 Maninder Singh
  2015-06-17  6:28 ` Michael S. Tsirkin
  2015-06-17  7:36 ` Frans Klaver
  0 siblings, 2 replies; 7+ messages in thread
From: Maninder Singh @ 2015-06-17  4:36 UTC (permalink / raw)
  To: davem, willemb, dborkman, al.drozdov, viro, eyal.birger, mst,
	netdev, linux-kernel
  Cc: pankaj.m, Maninder Singh

Use BUG_ON(condition) instead of if(condition)/BUG() .

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-21 16:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17  4:36 [RESUBMIT Patch 1/1] net: replace if()/BUG with BUG_ON Maninder Singh
2015-06-17  6:28 ` Michael S. Tsirkin
2015-06-17  7:36 ` Frans Klaver
2015-06-17  8:26   ` Alexander Drozdov
2015-06-17  8:30     ` Frans Klaver
2015-06-21 16:55       ` David Miller
2015-06-21 16:55         ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.