Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76f267b7 authored by Julia Lawall's avatar Julia Lawall Committed by Roland Dreier
Browse files

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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Acked-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent f4a75d2e
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -151,9 +151,8 @@ static void stop_ep_timer(struct c4iw_ep *ep)
{
{
	PDBG("%s ep %p\n", __func__, ep);
	PDBG("%s ep %p\n", __func__, ep);
	if (!timer_pending(&ep->timer)) {
	if (!timer_pending(&ep->timer)) {
		printk(KERN_ERR "%s timer stopped when its not running! "
		WARN(1, "%s timer stopped when its not running! "
		       "ep %p state %u\n", __func__, ep, ep->com.state);
		       "ep %p state %u\n", __func__, ep, ep->com.state);
		WARN_ON(1);
		return;
		return;
	}
	}
	del_timer_sync(&ep->timer);
	del_timer_sync(&ep->timer);
@@ -2551,9 +2550,8 @@ static void process_timeout(struct c4iw_ep *ep)
		__state_set(&ep->com, ABORTING);
		__state_set(&ep->com, ABORTING);
		break;
		break;
	default:
	default:
		printk(KERN_ERR "%s unexpected state ep %p tid %u state %u\n",
		WARN(1, "%s unexpected state ep %p tid %u state %u\n",
			__func__, ep, ep->hwtid, ep->com.state);
			__func__, ep, ep->hwtid, ep->com.state);
		WARN_ON(1);
		abort = 0;
		abort = 0;
	}
	}
	mutex_unlock(&ep->com.mutex);
	mutex_unlock(&ep->com.mutex);