Skip to content

Commit 987db58

Browse files
ssudhakarpmartinkpetersen
authored andcommitted
scsi: target: Rename target_setup_cmd_from_cdb() to target_cmd_parse_cdb()
This commit also removes the unused argument, cdb, that was passed to this function. Link: https://lore.kernel.org/r/1591559913-8388-5-git-send-email-sudhakar.panneerselvam@oracle.com Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Sudhakar Panneerselvam <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 9e95fb8 commit 987db58

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

drivers/target/iscsi/iscsi_target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ int iscsit_setup_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
11831183

11841184
/* only used for printks or comparing with ->ref_task_tag */
11851185
cmd->se_cmd.tag = (__force u32)cmd->init_task_tag;
1186-
cmd->sense_reason = target_setup_cmd_from_cdb(&cmd->se_cmd, hdr->cdb);
1186+
cmd->sense_reason = target_cmd_parse_cdb(&cmd->se_cmd);
11871187
if (cmd->sense_reason)
11881188
goto attach_cmd;
11891189

drivers/target/target_core_transport.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ target_cmd_init_cdb(struct se_cmd *cmd, unsigned char *cdb)
14641464
EXPORT_SYMBOL(target_cmd_init_cdb);
14651465

14661466
sense_reason_t
1467-
target_setup_cmd_from_cdb(struct se_cmd *cmd, unsigned char *cdb)
1467+
target_cmd_parse_cdb(struct se_cmd *cmd)
14681468
{
14691469
struct se_device *dev = cmd->se_dev;
14701470
sense_reason_t ret;
@@ -1486,7 +1486,7 @@ target_setup_cmd_from_cdb(struct se_cmd *cmd, unsigned char *cdb)
14861486
atomic_long_inc(&cmd->se_lun->lun_stats.cmd_pdus);
14871487
return 0;
14881488
}
1489-
EXPORT_SYMBOL(target_setup_cmd_from_cdb);
1489+
EXPORT_SYMBOL(target_cmd_parse_cdb);
14901490

14911491
/*
14921492
* Used by fabric module frontends to queue tasks directly.
@@ -1650,7 +1650,7 @@ int target_submit_cmd_map_sgls(struct se_cmd *se_cmd, struct se_session *se_sess
16501650
return 0;
16511651
}
16521652

1653-
rc = target_setup_cmd_from_cdb(se_cmd, cdb);
1653+
rc = target_cmd_parse_cdb(se_cmd);
16541654
if (rc != 0) {
16551655
transport_generic_request_failure(se_cmd, rc);
16561656
return 0;

drivers/target/target_core_xcopy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ static int target_xcopy_setup_pt_cmd(
530530
return -EINVAL;
531531

532532
cmd->tag = 0;
533-
if (target_setup_cmd_from_cdb(cmd, cdb))
533+
if (target_cmd_parse_cdb(cmd))
534534
return -EINVAL;
535535

536536
if (transport_generic_map_mem_to_cmd(cmd, xop->xop_data_sg,

include/target/target_core_fabric.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void transport_init_se_cmd(struct se_cmd *,
153153
struct se_session *, u32, int, int, unsigned char *, u64);
154154
sense_reason_t transport_lookup_cmd_lun(struct se_cmd *);
155155
sense_reason_t target_cmd_init_cdb(struct se_cmd *, unsigned char *);
156-
sense_reason_t target_setup_cmd_from_cdb(struct se_cmd *, unsigned char *);
156+
sense_reason_t target_cmd_parse_cdb(struct se_cmd *);
157157
int target_submit_cmd_map_sgls(struct se_cmd *, struct se_session *,
158158
unsigned char *, unsigned char *, u64, u32, int, int, int,
159159
struct scatterlist *, u32, struct scatterlist *, u32,

0 commit comments

Comments
 (0)