From: Grant Grundler Date: Tue, 26 Mar 2013 21:48:28 +0000 (+0000) Subject: SRPT: Fix odd use of WARN_ON() X-Git-Tag: v3.10-rc1~43^2^7 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=532ec6f1c0b5e936f73c607309253204866e2102;p=~emulex%2Finfiniband.git SRPT: Fix odd use of WARN_ON() While WARN_ON("const string") will work, it's intent is not obvious. The warning is more useful by showing the "state" value. Signed-off-by: Grant Grundler Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index c09d41b1a2f..b08ca7a9f76 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1374,7 +1374,7 @@ static int srpt_abort_cmd(struct srpt_send_ioctx *ioctx) target_put_sess_cmd(ioctx->ch->sess, &ioctx->cmd); break; default: - WARN_ON("ERROR: unexpected command state"); + WARN(1, "Unexpected command state (%d)", state); break; }