Commit 46d5bd62 authored by Bart Van Assche's avatar Bart Van Assche Committed by Nicholas Bellinger

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: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent e986a35a
...@@ -2615,17 +2615,6 @@ bool transport_wait_for_tasks(struct se_cmd *cmd) ...@@ -2615,17 +2615,6 @@ bool transport_wait_for_tasks(struct se_cmd *cmd)
} }
EXPORT_SYMBOL(transport_wait_for_tasks); 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 static
void transport_err_sector_info(unsigned char *buffer, sector_t bad_sector) 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, ...@@ -2819,9 +2808,8 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd,
buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10;
/* Not Ready */ /* Not Ready */
buffer[SPC_SENSE_KEY_OFFSET] = NOT_READY; buffer[SPC_SENSE_KEY_OFFSET] = NOT_READY;
transport_get_sense_codes(cmd, &asc, &ascq); buffer[SPC_ASC_KEY_OFFSET] = cmd->scsi_asc;
buffer[SPC_ASC_KEY_OFFSET] = asc; buffer[SPC_ASCQ_KEY_OFFSET] = cmd->scsi_ascq;
buffer[SPC_ASCQ_KEY_OFFSET] = ascq;
break; break;
case TCM_MISCOMPARE_VERIFY: case TCM_MISCOMPARE_VERIFY:
/* CURRENT ERROR */ /* CURRENT ERROR */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment