summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2015-07-08 16:58:50 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-07-24 07:08:33 +0200
commit46d5bd62ef9e3d6e2018963cbb725c91f864922d (patch)
treeef3bc461a06f8063a2267ad3e6cdc2736b7a50c3 /drivers/target
parenttcm_loop: Send I_T_NEXUS_LOSS_OCCURRED UA (diff)
downloadlinux-46d5bd62ef9e3d6e2018963cbb725c91f864922d.tar.xz
linux-46d5bd62ef9e3d6e2018963cbb725c91f864922d.zip
target: Inline transport_get_sense_codes()
Inline this function in its call site since it performs a trivial task and since it is only called once. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_transport.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index ce8574b7220c..b6708d1b69b8 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2615,17 +2615,6 @@ bool transport_wait_for_tasks(struct se_cmd *cmd)
}
EXPORT_SYMBOL(transport_wait_for_tasks);
-static int transport_get_sense_codes(
- struct se_cmd *cmd,
- u8 *asc,
- u8 *ascq)
-{
- *asc = cmd->scsi_asc;
- *ascq = cmd->scsi_ascq;
-
- return 0;
-}
-
static
void transport_err_sector_info(unsigned char *buffer, sector_t bad_sector)
{
@@ -2819,9 +2808,8 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd,
buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10;
/* Not Ready */
buffer[SPC_SENSE_KEY_OFFSET] = NOT_READY;
- transport_get_sense_codes(cmd, &asc, &ascq);
- buffer[SPC_ASC_KEY_OFFSET] = asc;
- buffer[SPC_ASCQ_KEY_OFFSET] = ascq;
+ buffer[SPC_ASC_KEY_OFFSET] = cmd->scsi_asc;
+ buffer[SPC_ASCQ_KEY_OFFSET] = cmd->scsi_ascq;
break;
case TCM_MISCOMPARE_VERIFY:
/* CURRENT ERROR */