diff options
| author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-11-03 06:58:27 -0400 |
|---|---|---|
| committer | Roland Dreier <roland@purestorage.com> | 2012-11-26 14:07:18 -0500 |
| commit | 76f267b7ad978fec755f74ada4020edcb7493657 (patch) | |
| tree | 125a7b5745393abf4ff72dbb2d69e1156e380e3e /drivers/infiniband | |
| parent | f4a75d2eb7b1e2206094b901be09adb31ba63681 (diff) | |
RDMA/cxgb4: 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')
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 6cfd4d8fd0b..5de86968379 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
| @@ -151,9 +151,8 @@ static void stop_ep_timer(struct c4iw_ep *ep) | |||
| 151 | { | 151 | { |
| 152 | PDBG("%s ep %p\n", __func__, ep); | 152 | PDBG("%s ep %p\n", __func__, ep); |
| 153 | if (!timer_pending(&ep->timer)) { | 153 | if (!timer_pending(&ep->timer)) { |
| 154 | printk(KERN_ERR "%s timer stopped when its not running! " | 154 | WARN(1, "%s timer stopped when its not running! " |
| 155 | "ep %p state %u\n", __func__, ep, ep->com.state); | 155 | "ep %p state %u\n", __func__, ep, ep->com.state); |
| 156 | WARN_ON(1); | ||
| 157 | return; | 156 | return; |
| 158 | } | 157 | } |
| 159 | del_timer_sync(&ep->timer); | 158 | del_timer_sync(&ep->timer); |
| @@ -2551,9 +2550,8 @@ static void process_timeout(struct c4iw_ep *ep) | |||
| 2551 | __state_set(&ep->com, ABORTING); | 2550 | __state_set(&ep->com, ABORTING); |
| 2552 | break; | 2551 | break; |
| 2553 | default: | 2552 | default: |
| 2554 | printk(KERN_ERR "%s unexpected state ep %p tid %u state %u\n", | 2553 | WARN(1, "%s unexpected state ep %p tid %u state %u\n", |
| 2555 | __func__, ep, ep->hwtid, ep->com.state); | 2554 | __func__, ep, ep->hwtid, ep->com.state); |
| 2556 | WARN_ON(1); | ||
| 2557 | abort = 0; | 2555 | abort = 0; |
| 2558 | } | 2556 | } |
| 2559 | mutex_unlock(&ep->com.mutex); | 2557 | mutex_unlock(&ep->com.mutex); |
