Commit b20d9bfd authored by Bart Van Assche's avatar Bart Van Assche Committed by Robert Love

libfc: Debug code fixes

The second argument of fc_lport_error() may be a valid frame pointer.
Hence only print it as an error code if it really is an error code.

Debug statements must end in a newline. Add one where it is missing.
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Cc: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
parent c1d45424
...@@ -1659,7 +1659,7 @@ static void fc_exch_recv_bls(struct fc_exch_mgr *mp, struct fc_frame *fp) ...@@ -1659,7 +1659,7 @@ static void fc_exch_recv_bls(struct fc_exch_mgr *mp, struct fc_frame *fp)
break; break;
default: default:
if (ep) if (ep)
FC_EXCH_DBG(ep, "BLS rctl %x - %s received", FC_EXCH_DBG(ep, "BLS rctl %x - %s received\n",
fh->fh_r_ctl, fh->fh_r_ctl,
fc_exch_rctl_name(fh->fh_r_ctl)); fc_exch_rctl_name(fh->fh_r_ctl));
break; break;
...@@ -1953,13 +1953,13 @@ static void fc_exch_rrq_resp(struct fc_seq *sp, struct fc_frame *fp, void *arg) ...@@ -1953,13 +1953,13 @@ static void fc_exch_rrq_resp(struct fc_seq *sp, struct fc_frame *fp, void *arg)
switch (op) { switch (op) {
case ELS_LS_RJT: case ELS_LS_RJT:
FC_EXCH_DBG(aborted_ep, "LS_RJT for RRQ"); FC_EXCH_DBG(aborted_ep, "LS_RJT for RRQ\n");
/* fall through */ /* fall through */
case ELS_LS_ACC: case ELS_LS_ACC:
goto cleanup; goto cleanup;
default: default:
FC_EXCH_DBG(aborted_ep, "unexpected response op %x " FC_EXCH_DBG(aborted_ep, "unexpected response op %x for RRQ\n",
"for RRQ", op); op);
return; return;
} }
......
...@@ -1088,7 +1088,7 @@ static void fc_lport_error(struct fc_lport *lport, struct fc_frame *fp) ...@@ -1088,7 +1088,7 @@ static void fc_lport_error(struct fc_lport *lport, struct fc_frame *fp)
{ {
unsigned long delay = 0; unsigned long delay = 0;
FC_LPORT_DBG(lport, "Error %ld in state %s, retries %d\n", FC_LPORT_DBG(lport, "Error %ld in state %s, retries %d\n",
PTR_ERR(fp), fc_lport_state(lport), IS_ERR(fp) ? -PTR_ERR(fp) : 0, fc_lport_state(lport),
lport->retry_count); lport->retry_count);
if (PTR_ERR(fp) == -FC_EX_CLOSED) if (PTR_ERR(fp) == -FC_EX_CLOSED)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment