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/ipv6/addrconf.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/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 74d543d504a1..a7842c54f58a 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -313,8 +313,10 @@ static void in6_dev_finish_destroy_rcu(struct rcu_head *head) | |||
313 | void in6_dev_finish_destroy(struct inet6_dev *idev) | 313 | void in6_dev_finish_destroy(struct inet6_dev *idev) |
314 | { | 314 | { |
315 | struct net_device *dev = idev->dev; | 315 | struct net_device *dev = idev->dev; |
316 | BUG_TRAP(idev->addr_list==NULL); | 316 | |
317 | BUG_TRAP(idev->mc_list==NULL); | 317 | WARN_ON(idev->addr_list != NULL); |
318 | WARN_ON(idev->mc_list != NULL); | ||
319 | |||
318 | #ifdef NET_REFCNT_DEBUG | 320 | #ifdef NET_REFCNT_DEBUG |
319 | printk(KERN_DEBUG "in6_dev_finish_destroy: %s\n", dev ? dev->name : "NIL"); | 321 | printk(KERN_DEBUG "in6_dev_finish_destroy: %s\n", dev ? dev->name : "NIL"); |
320 | #endif | 322 | #endif |
@@ -517,8 +519,9 @@ static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) | |||
517 | 519 | ||
518 | void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) | 520 | void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) |
519 | { | 521 | { |
520 | BUG_TRAP(ifp->if_next==NULL); | 522 | WARN_ON(ifp->if_next != NULL); |
521 | BUG_TRAP(ifp->lst_next==NULL); | 523 | WARN_ON(ifp->lst_next != NULL); |
524 | |||
522 | #ifdef NET_REFCNT_DEBUG | 525 | #ifdef NET_REFCNT_DEBUG |
523 | printk(KERN_DEBUG "inet6_ifa_finish_destroy\n"); | 526 | printk(KERN_DEBUG "inet6_ifa_finish_destroy\n"); |
524 | #endif | 527 | #endif |