On 12/23/2016 08:23 PM, Himanshu Madhani wrote:
>  static int tcm_qla2xxx_handle_tmr(struct qla_tgt_mgmt_cmd *mcmd, uint32_t 
> lun,
> -     uint8_t tmr_func, uint32_t tag)
> +     uint16_t tmr_func, uint32_t tag)
>  {
>       struct qla_tgt_sess *sess = mcmd->sess;
>       struct se_cmd *se_cmd = &mcmd->se_cmd;
> +     int transl_tmr_func;
> +
> +     switch (tmr_func) {
> +     case QLA_TGT_ABTS:
> +             pr_debug("%ld: ABTS received\n", sess->vha->host_no);
> +             transl_tmr_func = TMR_ABORT_TASK;
> +             break;
> +     case QLA_TGT_2G_ABORT_TASK:
> +             pr_debug("%ld: 2G Abort Task received\n", sess->vha->host_no);
> +             transl_tmr_func = TMR_ABORT_TASK;
> +             break;
> +     case QLA_TGT_CLEAR_ACA:
> +             pr_debug("%ld: CLEAR_ACA received\n", sess->vha->host_no);
> +             transl_tmr_func = TMR_CLEAR_ACA;
> +             break;
> +     case QLA_TGT_TARGET_RESET:
> +             pr_debug("%ld: TARGET_RESET received\n", sess->vha->host_no);
> +             transl_tmr_func = TMR_TARGET_WARM_RESET;
> +             break;
> +     case QLA_TGT_LUN_RESET:
> +             pr_debug("%ld: LUN_RESET received\n", sess->vha->host_no);
> +             transl_tmr_func = TMR_LUN_RESET;
> +             break;
> +     case QLA_TGT_CLEAR_TS:
> +             pr_debug("%ld: CLEAR_TS received\n", sess->vha->host_no);
> +             transl_tmr_func = TMR_CLEAR_TASK_SET;
> +             break;
> +     case QLA_TGT_ABORT_TS:
> +             pr_debug("%ld: ABORT_TS received\n", sess->vha->host_no);
> +             transl_tmr_func = TMR_ABORT_TASK_SET;
> +             break;
> +     default:
> +             pr_debug("%ld: Unknown task mgmt fn 0x%x\n",
> +                 sess->vha->host_no, tmr_func);
> +             return -ENOSYS;
> +             break;
> +     }
>  
>       return target_submit_tmr(se_cmd, sess->se_sess, NULL, lun, mcmd,
>                       tmr_func, GFP_ATOMIC, tag, TARGET_SCF_ACK_KREF);

Hello Himanshu and Quinn,

This patch introduces a new compiler warning when building with W=1,
namely that transl_tmr_func is set but not used. Please review the code.

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to