aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/user_dma.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-07-26 00:43:18 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-26 00:43:18 -0400
commit547b792cac0a038b9dbf958d3c120df3740b5572 (patch)
tree08554d083b0ca7d65739dc1ce12f9b12a9b8e1f8 /net/core/user_dma.c
parent53e5e96ec18da6f65e89f05674711e1c93d8df67 (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/user_dma.c')
-rw-r--r--net/core/user_dma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/user_dma.c b/net/core/user_dma.c
index c77aff9c6eb3..53c6b67b2877 100644
--- a/net/core/user_dma.c
+++ b/net/core/user_dma.c
@@ -27,7 +27,6 @@
27 27
28#include <linux/dmaengine.h> 28#include <linux/dmaengine.h>
29#include <linux/socket.h> 29#include <linux/socket.h>
30#include <linux/rtnetlink.h> /* for BUG_TRAP */
31#include <net/tcp.h> 30#include <net/tcp.h>
32#include <net/netdma.h> 31#include <net/netdma.h>
33 32
@@ -71,7 +70,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
71 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { 70 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
72 int end; 71 int end;
73 72
74 BUG_TRAP(start <= offset + len); 73 WARN_ON(start > offset + len);
75 74
76 end = start + skb_shinfo(skb)->frags[i].size; 75 end = start + skb_shinfo(skb)->frags[i].size;
77 copy = end - offset; 76 copy = end - offset;
@@ -100,7 +99,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
100 for (; list; list = list->next) { 99 for (; list; list = list->next) {
101 int end; 100 int end;
102 101
103 BUG_TRAP(start <= offset + len); 102 WARN_ON(start > offset + len);
104 103
105 end = start + list->len; 104 end = start + list->len;
106 copy = end - offset; 105 copy = end - offset;