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/core/dev.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/core/dev.c')
-rw-r--r-- | net/core/dev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index ccf97f9f37eb..c6f9c83745e6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1973,7 +1973,7 @@ static void net_tx_action(struct softirq_action *h) | |||
1973 | struct sk_buff *skb = clist; | 1973 | struct sk_buff *skb = clist; |
1974 | clist = clist->next; | 1974 | clist = clist->next; |
1975 | 1975 | ||
1976 | BUG_TRAP(!atomic_read(&skb->users)); | 1976 | WARN_ON(atomic_read(&skb->users)); |
1977 | __kfree_skb(skb); | 1977 | __kfree_skb(skb); |
1978 | } | 1978 | } |
1979 | } | 1979 | } |
@@ -3847,7 +3847,7 @@ static void rollback_registered(struct net_device *dev) | |||
3847 | dev->uninit(dev); | 3847 | dev->uninit(dev); |
3848 | 3848 | ||
3849 | /* Notifier chain MUST detach us from master device. */ | 3849 | /* Notifier chain MUST detach us from master device. */ |
3850 | BUG_TRAP(!dev->master); | 3850 | WARN_ON(dev->master); |
3851 | 3851 | ||
3852 | /* Remove entries from kobject tree */ | 3852 | /* Remove entries from kobject tree */ |
3853 | netdev_unregister_kobject(dev); | 3853 | netdev_unregister_kobject(dev); |
@@ -4169,9 +4169,9 @@ void netdev_run_todo(void) | |||
4169 | 4169 | ||
4170 | /* paranoia */ | 4170 | /* paranoia */ |
4171 | BUG_ON(atomic_read(&dev->refcnt)); | 4171 | BUG_ON(atomic_read(&dev->refcnt)); |
4172 | BUG_TRAP(!dev->ip_ptr); | 4172 | WARN_ON(dev->ip_ptr); |
4173 | BUG_TRAP(!dev->ip6_ptr); | 4173 | WARN_ON(dev->ip6_ptr); |
4174 | BUG_TRAP(!dev->dn_ptr); | 4174 | WARN_ON(dev->dn_ptr); |
4175 | 4175 | ||
4176 | if (dev->destructor) | 4176 | if (dev->destructor) |
4177 | dev->destructor(dev); | 4177 | dev->destructor(dev); |