diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index c488ddea8..acd23aed9 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -1301,7 +1301,7 @@ out: return; } -uint32_t q2t_convert_to_fc_tm_status(int scst_mstatus) +static uint32_t q2t_convert_to_fc_tm_status(int scst_mstatus) { uint32_t res; @@ -1794,15 +1794,13 @@ static int q2t_pre_xmit_response(struct q2t_cmd *cmd, { int res; struct q2t_tgt *tgt = cmd->tgt; - scsi_qla_host_t *ha; + scsi_qla_host_t *ha = tgt->ha; uint16_t full_req_cnt; struct scst_cmd *scst_cmd = cmd->scst_cmd; TRACE_ENTRY(); if (unlikely(cmd->aborted)) { - scsi_qla_host_t *ha = tgt->ha; - TRACE(TRACE_MGMT_MINOR, "qla2x00tgt(%ld): terminating exchange " "for aborted cmd=%p (scst_cmd=%p, tag=%d)", ha->instance, cmd, scst_cmd, cmd->tag); @@ -1830,7 +1828,6 @@ static int q2t_pre_xmit_response(struct q2t_cmd *cmd, prm->seg_cnt = -1; prm->req_cnt = 1; prm->add_status_pkt = 0; - ha = tgt->ha; TRACE_DBG("rq_result=%x, xmit_type=%x", prm->rq_result, xmit_type); if (prm->rq_result != 0) diff --git a/qla2x00t/qla_attr.c b/qla2x00t/qla_attr.c index 345b0b04f..bea818b57 100644 --- a/qla2x00t/qla_attr.c +++ b/qla2x00t/qla_attr.c @@ -69,7 +69,7 @@ qla2x00_store_class2_enabled(struct device *dev, break; default: #if defined(QL_DEBUG_LEVEL_9) || defined(QL_DEBUG_LEVEL_11) - printk("%s: Requested action not understood: %s\n", + qla_printk(KERN_ERR "%s: Requested action not understood: %s\n", __func__, buffer); #endif res = -EINVAL; @@ -123,8 +123,8 @@ qla2x00_store_tgt_enabled(struct device *dev, goto out; if (qla_target.tgt_host_action == NULL) { - printk(KERN_INFO "%s: not acting for lack of target driver\n", - __func__); + qla_printk(KERN_INFO, ha, "%s: not acting for lack of target " + "driver\n", __func__); res = -EINVAL; goto out; } @@ -137,8 +137,8 @@ qla2x00_store_tgt_enabled(struct device *dev, res = qla_target.tgt_host_action(ha, ENABLE_TARGET_MODE); break; default: - printk("%s: Requested action not understood: %s\n", - __func__, buffer); + qla_printk(KERN_ERR, ha, "%s: Requested action not " + "understood: %s\n", __func__, buffer); res = -EINVAL; goto out; } @@ -186,18 +186,18 @@ qla2x00_store_expl_conf_enabled(struct device *dev, switch (buffer[0]) { case '0': ha->enable_explicit_conf = 0; - printk("qla2xxx(%ld): explicit conformation disabled\n", - ha->instance); + qla_printk(KERN_INFO, ha, "qla2xxx(%ld): explicit conformation " + "disabled\n", ha->instance); break; case '1': ha->enable_explicit_conf = 1; - printk("qla2xxx(%ld): explicit conformation enabled\n", - ha->instance); + qla_printk(KERN_INFO, ha, "qla2xxx(%ld): explicit conformation " + "enabled\n", ha->instance); break; default: #if defined(QL_DEBUG_LEVEL_9) || defined(QL_DEBUG_LEVEL_11) - printk("%s: Requested action not understood: %s\n", - __func__, buffer); + qla_printk(KERN_ERR, ha, "%s: Requested action not understood: " + "%s\n", __func__, buffer); #endif break; } diff --git a/qla2x00t/qla_init.c b/qla2x00t/qla_init.c index 60bdc947b..14fdd93b5 100644 --- a/qla2x00t/qla_init.c +++ b/qla2x00t/qla_init.c @@ -4194,8 +4194,8 @@ int qla2xxx_tgt_register_driver(struct qla_tgt_data *tgt_data) ENTER(__func__); if ((tgt_data == NULL) || (tgt_data->magic != QLA2X_TARGET_MAGIC)) { - printk("***ERROR*** Wrong version of the target mode add-on: " - "%d\n", tgt_data->magic); + printk(KERN_ERR "***ERROR*** Wrong version of the target mode " + "add-on: %d\n", tgt_data->magic); res = -EINVAL; goto out; }