Skip to content

Commit

Permalink
scsi: target: Rename target_setup_cmd_from_cdb() to target_cmd_parse_…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
ssudhakarp authored and martinkpetersen committed Jun 10, 2020
1 parent 9e95fb8 commit 987db58
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ int iscsit_setup_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,

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

Expand Down
6 changes: 3 additions & 3 deletions drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ target_cmd_init_cdb(struct se_cmd *cmd, unsigned char *cdb)
EXPORT_SYMBOL(target_cmd_init_cdb);

sense_reason_t
target_setup_cmd_from_cdb(struct se_cmd *cmd, unsigned char *cdb)
target_cmd_parse_cdb(struct se_cmd *cmd)
{
struct se_device *dev = cmd->se_dev;
sense_reason_t ret;
Expand All @@ -1486,7 +1486,7 @@ target_setup_cmd_from_cdb(struct se_cmd *cmd, unsigned char *cdb)
atomic_long_inc(&cmd->se_lun->lun_stats.cmd_pdus);
return 0;
}
EXPORT_SYMBOL(target_setup_cmd_from_cdb);
EXPORT_SYMBOL(target_cmd_parse_cdb);

/*
* Used by fabric module frontends to queue tasks directly.
Expand Down Expand Up @@ -1650,7 +1650,7 @@ int target_submit_cmd_map_sgls(struct se_cmd *se_cmd, struct se_session *se_sess
return 0;
}

rc = target_setup_cmd_from_cdb(se_cmd, cdb);
rc = target_cmd_parse_cdb(se_cmd);
if (rc != 0) {
transport_generic_request_failure(se_cmd, rc);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/target/target_core_xcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ static int target_xcopy_setup_pt_cmd(
return -EINVAL;

cmd->tag = 0;
if (target_setup_cmd_from_cdb(cmd, cdb))
if (target_cmd_parse_cdb(cmd))
return -EINVAL;

if (transport_generic_map_mem_to_cmd(cmd, xop->xop_data_sg,
Expand Down
2 changes: 1 addition & 1 deletion include/target/target_core_fabric.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void transport_init_se_cmd(struct se_cmd *,
struct se_session *, u32, int, int, unsigned char *, u64);
sense_reason_t transport_lookup_cmd_lun(struct se_cmd *);
sense_reason_t target_cmd_init_cdb(struct se_cmd *, unsigned char *);
sense_reason_t target_setup_cmd_from_cdb(struct se_cmd *, unsigned char *);
sense_reason_t target_cmd_parse_cdb(struct se_cmd *);
int target_submit_cmd_map_sgls(struct se_cmd *, struct se_session *,
unsigned char *, unsigned char *, u64, u32, int, int, int,
struct scatterlist *, u32, struct scatterlist *, u32,
Expand Down

0 comments on commit 987db58

Please sign in to comment.