diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-07-19 04:09:01 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-07-22 05:37:42 -0400 |
commit | efa4988d72c69d3024ee25ad1ae87c83b9f8267e (patch) | |
tree | 7ee08a9e843d21a0163cbaa579f9b042ed929b29 | |
parent | e434f1f182674d775c52869d49f714a2614d1c66 (diff) |
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: Fubo Chen <fubo.chen@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 2 | ||||
-rw-r--r-- | drivers/target/target_core_device.c | 1 | ||||
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 2 | ||||
-rw-r--r-- | include/target/target_core_device.h | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 70c2e7fa6664..2d0f22a91f67 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -122,7 +122,7 @@ static struct se_cmd *tcm_loop_allocate_core_cmd( | |||
122 | /* | 122 | /* |
123 | * Locate the struct se_lun pointer and attach it to struct se_cmd | 123 | * Locate the struct se_lun pointer and attach it to struct se_cmd |
124 | */ | 124 | */ |
125 | if (transport_get_lun_for_cmd(se_cmd, NULL, tl_cmd->sc->device->lun) < 0) { | 125 | if (transport_get_lun_for_cmd(se_cmd, tl_cmd->sc->device->lun) < 0) { |
126 | kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); | 126 | kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); |
127 | set_host_byte(sc, DID_NO_CONNECT); | 127 | set_host_byte(sc, DID_NO_CONNECT); |
128 | return NULL; | 128 | return NULL; |
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index f5516a1a32e8..e76ffc5b2079 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c | |||
@@ -56,7 +56,6 @@ static void se_dev_stop(struct se_device *dev); | |||
56 | 56 | ||
57 | int transport_get_lun_for_cmd( | 57 | int transport_get_lun_for_cmd( |
58 | struct se_cmd *se_cmd, | 58 | struct se_cmd *se_cmd, |
59 | unsigned char *cdb, | ||
60 | u32 unpacked_lun) | 59 | u32 unpacked_lun) |
61 | { | 60 | { |
62 | struct se_dev_entry *deve; | 61 | struct se_dev_entry *deve; |
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index b2a106729d49..92a449aededa 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -637,7 +637,7 @@ static void ft_send_cmd(struct ft_cmd *cmd) | |||
637 | fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd); | 637 | fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd); |
638 | 638 | ||
639 | cmd->lun = scsilun_to_int((struct scsi_lun *)fcp->fc_lun); | 639 | cmd->lun = scsilun_to_int((struct scsi_lun *)fcp->fc_lun); |
640 | ret = transport_get_lun_for_cmd(&cmd->se_cmd, NULL, cmd->lun); | 640 | ret = transport_get_lun_for_cmd(&cmd->se_cmd, cmd->lun); |
641 | if (ret < 0) { | 641 | if (ret < 0) { |
642 | ft_dump_cmd(cmd, __func__); | 642 | ft_dump_cmd(cmd, __func__); |
643 | transport_send_check_condition_and_sense(&cmd->se_cmd, | 643 | transport_send_check_condition_and_sense(&cmd->se_cmd, |
diff --git a/include/target/target_core_device.h b/include/target/target_core_device.h index 52b18a5752c9..d9745bfa4429 100644 --- a/include/target/target_core_device.h +++ b/include/target/target_core_device.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef TARGET_CORE_DEVICE_H | 1 | #ifndef TARGET_CORE_DEVICE_H |
2 | #define TARGET_CORE_DEVICE_H | 2 | #define TARGET_CORE_DEVICE_H |
3 | 3 | ||
4 | extern int transport_get_lun_for_cmd(struct se_cmd *, unsigned char *, u32); | 4 | extern int transport_get_lun_for_cmd(struct se_cmd *, u32); |
5 | extern int transport_get_lun_for_tmr(struct se_cmd *, u32); | 5 | extern int transport_get_lun_for_tmr(struct se_cmd *, u32); |
6 | extern struct se_dev_entry *core_get_se_deve_from_rtpi( | 6 | extern struct se_dev_entry *core_get_se_deve_from_rtpi( |
7 | struct se_node_acl *, u16); | 7 | struct se_node_acl *, u16); |