All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Himanshu Madhani <himanshu.madhani@cavium.com>,
	target-devel@vger.kernel.org, hch@infradead.org,
	nab@linux-iscsi.org
Cc: giridhar.malavali@cavium.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 02/11] qla2xxx: Cleanup TMF code translation from qla_target.
Date: Wed, 11 Jan 2017 12:05:17 -0800	[thread overview]
Message-ID: <c4a6fb9b-5523-5070-50ed-b869a4686262@sandisk.com> (raw)
In-Reply-To: <1482553419-4117-3-git-send-email-himanshu.madhani@cavium.com>

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.

  reply	other threads:[~2017-01-11 20:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-24  4:23 [PATCH 00/11] qla2xxx: Feature updates for target Himanshu Madhani
2016-12-24  4:23 ` [PATCH 01/11] qla2xxx: Remove direct access of scsi_status field in se_cmd Himanshu Madhani
2016-12-24  4:23 ` [PATCH 02/11] qla2xxx: Cleanup TMF code translation from qla_target Himanshu Madhani
2017-01-11 20:05   ` Bart Van Assche [this message]
2017-01-11 20:43     ` Madhani, Himanshu
2017-01-11 21:08   ` Bart Van Assche
2017-01-11 23:01     ` Madhani, Himanshu
2016-12-24  4:23 ` [PATCH 03/11] qla2xxx: Make trace flags more readable Himanshu Madhani
2017-01-09 13:11   ` Christoph Hellwig
2017-01-09 18:36     ` Madhani, Himanshu
2017-01-11 20:47   ` Bart Van Assche
2017-01-11 20:54     ` Madhani, Himanshu
2016-12-24  4:23 ` [PATCH 04/11] qla2xxx: Cleanup SRR code Himanshu Madhani
2017-01-09 13:13   ` Christoph Hellwig
2017-01-10 17:55     ` Madhani, Himanshu
2016-12-24  4:23 ` [PATCH 05/11] qla2xxx: Fix wrong argument in sp done callback Himanshu Madhani
2017-01-09 13:17   ` Christoph Hellwig
2017-01-09 18:05     ` Madhani, Himanshu
2016-12-24  4:23 ` [PATCH 06/11] qla2xxx: Use d_id instead of s_id for more clarity Himanshu Madhani
2017-01-09 13:17   ` Christoph Hellwig
2016-12-24  4:23 ` [PATCH 07/11] qla2xxx: Track I-T nexus as single fc_port struct Himanshu Madhani
2017-01-09 13:28   ` Christoph Hellwig
2016-12-24  4:23 ` [PATCH 08/11] qla2xxx: Add framework for Async fabric discovery Himanshu Madhani
2017-01-11 20:08   ` Bart Van Assche
2017-01-13 17:50     ` Madhani, Himanshu
2016-12-24  4:23 ` [PATCH 09/11] qla2xxx: Add Dual mode support in the driver Himanshu Madhani
2017-01-11 19:51   ` Bart Van Assche
2017-01-13 22:13     ` Madhani, Himanshu
2016-12-24  4:23 ` [PATCH 10/11] qla2xxx: Remove unused reverse_ini_mode Himanshu Madhani
2016-12-24  4:23 ` [PATCH 11/11] qla2xxx: Improve RSCN handling in driver Himanshu Madhani
2017-01-11 21:05   ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4a6fb9b-5523-5070-50ed-b869a4686262@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=giridhar.malavali@cavium.com \
    --cc=hch@infradead.org \
    --cc=himanshu.madhani@cavium.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.