On Tue, 2011-11-29 at 00:14 +0100, Jörn Engel wrote: > Nick, > > given the proven difficulty with conditional expressions, can we try > to make these as obvious and non-obfuscated as possible? > > On Mon, 28 November 2011 15:03:39 -0800, Nicholas A. Bellinger wrote: > > > > diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c > > index 364660d..5b61680 100644 > > --- a/drivers/scsi/qla2xxx/qla_target.c > > +++ b/drivers/scsi/qla2xxx/qla_target.c > > @@ -2043,16 +2043,16 @@ static int qla_tgt_pre_xmit_response(struct qla_tgt_cmd *cmd, struct qla_tgt_prm > > prm->residual = se_cmd->residual_count; > > ql_dbg(ql_dbg_tgt, vha, 0xe012, "Residual underflow: %d (tag %d, " > > "op %x, bufflen %d, rq_result %x)\n", > > - prm->residual, cmd->tag, > > - se_cmd->t_task_cdb[0], cmd->bufflen, > > + prm->residual, cmd->tag, (se_cmd->t_task_cdb != NULL) ? > > + se_cmd->t_task_cdb[0] : 0x00, cmd->bufflen, > > + prm->residual, cmd->tag, > + se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0] : 0, > + cmd->bufflen, > > > prm->rq_result); > > prm->rq_result |= SS_RESIDUAL_UNDER; > > } else if (se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) { > > prm->residual = se_cmd->residual_count; > > ql_dbg(ql_dbg_tgt, vha, 0xe013, "Residual overflow: %d (tag %d, " > > "op %x, bufflen %d, rq_result %x)\n", > > - prm->residual, cmd->tag, > > - se_cmd->t_task_cdb[0], cmd->bufflen, > > + prm->residual, cmd->tag, (se_cmd->t_task_cdb != NULL) ? > > + se_cmd->t_task_cdb[0] : 0x00, cmd->bufflen, > > + prm->residual, cmd->tag, > + se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0] : 0, > + cmd->bufflen, > > Something like that maybe? > Fair enough. Fixing this up to use a single line now. --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html