projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41ef2d5
)
SRPT: Fix odd use of WARN_ON()
author
Grant Grundler
<grundler@chromium.org>
Tue, 26 Mar 2013 21:48:28 +0000
(21:48 +0000)
committer
Roland Dreier
<roland@purestorage.com>
Wed, 17 Apr 2013 05:58:08 +0000
(22:58 -0700)
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 <grundler@chromium.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srpt/ib_srpt.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/ulp/srpt/ib_srpt.c
b/drivers/infiniband/ulp/srpt/ib_srpt.c
index c09d41b1a2ff59a663a3af484bb919a3ce4dffc2..b08ca7a9f76bf8ea70f63bfd6c291d4d71b5814d 100644
(file)
--- 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;
}