Commit efa4988d authored by Nicholas Bellinger's avatar Nicholas Bellinger

target: Remove unnecessary *cdb transport_get_lun_for_cmd parameter

This patch removes the now unnecessary 'unsigned char *cdb' function
parameter from transport_get_lun_for_cmd().  This also includes updating
lio-target, tcm_loop and tcm_fc usage of transport_get_lun_for_cmd().
Reported-by: default avatarFubo Chen <fubo.chen@gmail.com>
Signed-off-by: default avatarNicholas A. Bellinger <nab@linux-iscsi.org>
parent e434f1f1
...@@ -122,7 +122,7 @@ static struct se_cmd *tcm_loop_allocate_core_cmd( ...@@ -122,7 +122,7 @@ static struct se_cmd *tcm_loop_allocate_core_cmd(
/* /*
* Locate the struct se_lun pointer and attach it to struct se_cmd * Locate the struct se_lun pointer and attach it to struct se_cmd
*/ */
if (transport_get_lun_for_cmd(se_cmd, NULL, tl_cmd->sc->device->lun) < 0) { if (transport_get_lun_for_cmd(se_cmd, tl_cmd->sc->device->lun) < 0) {
kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); kmem_cache_free(tcm_loop_cmd_cache, tl_cmd);
set_host_byte(sc, DID_NO_CONNECT); set_host_byte(sc, DID_NO_CONNECT);
return NULL; return NULL;
......
...@@ -56,7 +56,6 @@ static void se_dev_stop(struct se_device *dev); ...@@ -56,7 +56,6 @@ static void se_dev_stop(struct se_device *dev);
int transport_get_lun_for_cmd( int transport_get_lun_for_cmd(
struct se_cmd *se_cmd, struct se_cmd *se_cmd,
unsigned char *cdb,
u32 unpacked_lun) u32 unpacked_lun)
{ {
struct se_dev_entry *deve; struct se_dev_entry *deve;
......
...@@ -637,7 +637,7 @@ static void ft_send_cmd(struct ft_cmd *cmd) ...@@ -637,7 +637,7 @@ static void ft_send_cmd(struct ft_cmd *cmd)
fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd); fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd);
cmd->lun = scsilun_to_int((struct scsi_lun *)fcp->fc_lun); cmd->lun = scsilun_to_int((struct scsi_lun *)fcp->fc_lun);
ret = transport_get_lun_for_cmd(&cmd->se_cmd, NULL, cmd->lun); ret = transport_get_lun_for_cmd(&cmd->se_cmd, cmd->lun);
if (ret < 0) { if (ret < 0) {
ft_dump_cmd(cmd, __func__); ft_dump_cmd(cmd, __func__);
transport_send_check_condition_and_sense(&cmd->se_cmd, transport_send_check_condition_and_sense(&cmd->se_cmd,
......
#ifndef TARGET_CORE_DEVICE_H #ifndef TARGET_CORE_DEVICE_H
#define TARGET_CORE_DEVICE_H #define TARGET_CORE_DEVICE_H
extern int transport_get_lun_for_cmd(struct se_cmd *, unsigned char *, u32); extern int transport_get_lun_for_cmd(struct se_cmd *, u32);
extern int transport_get_lun_for_tmr(struct se_cmd *, u32); extern int transport_get_lun_for_tmr(struct se_cmd *, u32);
extern struct se_dev_entry *core_get_se_deve_from_rtpi( extern struct se_dev_entry *core_get_se_deve_from_rtpi(
struct se_node_acl *, u16); struct se_node_acl *, u16);
......
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