diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-07-26 00:43:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-26 00:43:18 -0400 |
commit | 547b792cac0a038b9dbf958d3c120df3740b5572 (patch) | |
tree | 08554d083b0ca7d65739dc1ce12f9b12a9b8e1f8 /net/rxrpc/af_rxrpc.c | |
parent | 53e5e96ec18da6f65e89f05674711e1c93d8df67 (diff) |
net: convert BUG_TRAP to generic WARN_ON
Removes legacy reinvent-the-wheel type thing. The generic
machinery integrates much better to automated debugging aids
such as kerneloops.org (and others), and is unambiguous due to
better naming. Non-intuively BUG_TRAP() is actually equal to
WARN_ON() rather than BUG_ON() though some might actually be
promoted to BUG_ON() but I left that to future.
I could make at least one BUILD_BUG_ON conversion.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/af_rxrpc.c')
-rw-r--r-- | net/rxrpc/af_rxrpc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 4b2682feeedc..32e489118beb 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c | |||
@@ -660,9 +660,9 @@ static void rxrpc_sock_destructor(struct sock *sk) | |||
660 | 660 | ||
661 | rxrpc_purge_queue(&sk->sk_receive_queue); | 661 | rxrpc_purge_queue(&sk->sk_receive_queue); |
662 | 662 | ||
663 | BUG_TRAP(!atomic_read(&sk->sk_wmem_alloc)); | 663 | WARN_ON(atomic_read(&sk->sk_wmem_alloc)); |
664 | BUG_TRAP(sk_unhashed(sk)); | 664 | WARN_ON(!sk_unhashed(sk)); |
665 | BUG_TRAP(!sk->sk_socket); | 665 | WARN_ON(sk->sk_socket); |
666 | 666 | ||
667 | if (!sock_flag(sk, SOCK_DEAD)) { | 667 | if (!sock_flag(sk, SOCK_DEAD)) { |
668 | printk("Attempt to release alive rxrpc socket: %p\n", sk); | 668 | printk("Attempt to release alive rxrpc socket: %p\n", sk); |