Skip to content

Commit

Permalink
SRPT: Fix odd use of WARN_ON()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Grant Grundler authored and Roland Dreier committed Apr 17, 2013
1 parent 41ef2d5 commit 532ec6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/ulp/srpt/ib_srpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 532ec6f

Please sign in to comment.