diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-11-03 06:58:29 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-11-26 14:08:16 -0500 |
commit | 5107c2a3d117de8219a53e622c0f1f1bc3f7d1ae (patch) | |
tree | 0923164ff79ddcdf1276647ad2dfd6c3c2ad2f38 /drivers/infiniband/hw/cxgb3 | |
parent | c9795bd708e37ed4154e838a1f4576192eeeacca (diff) |
RDMA/cxgb3: use WARN
Use WARN rather than printk followed by WARN_ON(1), for conciseness.
A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression list es;
@@
-printk(
+WARN(1,
es);
-WARN_ON(1);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index aaf88ef9409c..3e094cd6a0e3 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -128,9 +128,8 @@ static void stop_ep_timer(struct iwch_ep *ep) | |||
128 | { | 128 | { |
129 | PDBG("%s ep %p\n", __func__, ep); | 129 | PDBG("%s ep %p\n", __func__, ep); |
130 | if (!timer_pending(&ep->timer)) { | 130 | if (!timer_pending(&ep->timer)) { |
131 | printk(KERN_ERR "%s timer stopped when its not running! ep %p state %u\n", | 131 | WARN(1, "%s timer stopped when its not running! ep %p state %u\n", |
132 | __func__, ep, ep->com.state); | 132 | __func__, ep, ep->com.state); |
133 | WARN_ON(1); | ||
134 | return; | 133 | return; |
135 | } | 134 | } |
136 | del_timer_sync(&ep->timer); | 135 | del_timer_sync(&ep->timer); |
@@ -1756,9 +1755,8 @@ static void ep_timeout(unsigned long arg) | |||
1756 | __state_set(&ep->com, ABORTING); | 1755 | __state_set(&ep->com, ABORTING); |
1757 | break; | 1756 | break; |
1758 | default: | 1757 | default: |
1759 | printk(KERN_ERR "%s unexpected state ep %p state %u\n", | 1758 | WARN(1, "%s unexpected state ep %p state %u\n", |
1760 | __func__, ep, ep->com.state); | 1759 | __func__, ep, ep->com.state); |
1761 | WARN_ON(1); | ||
1762 | abort = 0; | 1760 | abort = 0; |
1763 | } | 1761 | } |
1764 | spin_unlock_irqrestore(&ep->com.lock, flags); | 1762 | spin_unlock_irqrestore(&ep->com.lock, flags); |