]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
target: Remove unnecessary *cdb transport_get_lun_for_cmd parameter
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 19 Jul 2011 08:09:01 +0000 (08:09 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 22 Jul 2011 09:37:42 +0000 (09:37 +0000)
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>
drivers/target/loopback/tcm_loop.c
drivers/target/target_core_device.c
drivers/target/tcm_fc/tfc_cmd.c
include/target/target_core_device.h

index 70c2e7fa66643f7a7cdf040c62d74e977d7b9d1b..2d0f22a91f674225fbc58113fe354d50fd210ae1 100644 (file)
@@ -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
         */
-       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);
                set_host_byte(sc, DID_NO_CONNECT);
                return NULL;
index f5516a1a32e8d1949ca388911ca568161541b459..e76ffc5b2079e4ccb89efd3a9360ed7508b45367 100644 (file)
@@ -56,7 +56,6 @@ static void se_dev_stop(struct se_device *dev);
 
 int transport_get_lun_for_cmd(
        struct se_cmd *se_cmd,
-       unsigned char *cdb,
        u32 unpacked_lun)
 {
        struct se_dev_entry *deve;
index b2a106729d4914eca2c275adb956a944939d9b99..92a449aededa358f7bb6a19e7c3219a87d8bc815 100644 (file)
@@ -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);
 
        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) {
                ft_dump_cmd(cmd, __func__);
                transport_send_check_condition_and_sense(&cmd->se_cmd,
index 52b18a5752c93d7aec425817bffcfb782f7a1a36..d9745bfa442981b4b2a4eb26dc01bd215ca96cf2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef 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 struct se_dev_entry *core_get_se_deve_from_rtpi(
                                        struct se_node_acl *, u16);