* [PATCH 1/1] net: replace if()/BUG with BUG_ON()
@ 2015-06-15 5:05 Maninder Singh
2015-06-16 0:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Maninder Singh @ 2015-06-15 5:05 UTC (permalink / raw)
To: davem, willemb, dborkman, al.drozdov, viro, eyal.birger, mst,
netdev, linux-kernel
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 [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] net: replace if()/BUG with BUG_ON()
2015-06-15 5:05 [PATCH 1/1] net: replace if()/BUG with BUG_ON() Maninder Singh
@ 2015-06-16 0:12 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-06-16 0:12 UTC (permalink / raw)
To: maninder1.s
Cc: willemb, dborkman, al.drozdov, viro, eyal.birger, mst, netdev,
linux-kernel
From: Maninder Singh <maninder1.s@samsung.com>
Date: Mon, 15 Jun 2015 10:35:05 +0530
> 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>
Your email client corrupted this patch, making it unusable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-16 0:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 5:05 [PATCH 1/1] net: replace if()/BUG with BUG_ON() Maninder Singh
2015-06-16 0:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®