aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-25 14:56:43 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-10-23 23:20:46 -0400
commita3eedc227bfa7c9e21ef3cebe164d06a4c507a71 (patch)
tree276a9003777f55abd8633a23c9e4151509c8d0f4 /drivers/target
parent02b1a7463420e1cebe86c6755c44d3bd9489829e (diff)
target: remove unused se_subsystem_api methods
The cdb_none, map_data_SG and map_control_SG methods have no callers left and can be removed now. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_transport.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index e5905269c85..ae1efc7c9ec 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -4023,7 +4023,7 @@ static int transport_allocate_data_tasks(
4023 struct se_task *task; 4023 struct se_task *task;
4024 struct se_device *dev = cmd->se_dev; 4024 struct se_device *dev = cmd->se_dev;
4025 unsigned long flags; 4025 unsigned long flags;
4026 int task_count, i, ret; 4026 int task_count, i;
4027 sector_t sectors, dev_max_sectors = dev->se_sub_dev->se_dev_attrib.max_sectors; 4027 sector_t sectors, dev_max_sectors = dev->se_sub_dev->se_dev_attrib.max_sectors;
4028 u32 sector_size = dev->se_sub_dev->se_dev_attrib.block_size; 4028 u32 sector_size = dev->se_sub_dev->se_dev_attrib.block_size;
4029 struct scatterlist *sg; 4029 struct scatterlist *sg;
@@ -4101,20 +4101,6 @@ static int transport_allocate_data_tasks(
4101 list_add_tail(&task->t_list, &cmd->t_task_list); 4101 list_add_tail(&task->t_list, &cmd->t_task_list);
4102 spin_unlock_irqrestore(&cmd->t_state_lock, flags); 4102 spin_unlock_irqrestore(&cmd->t_state_lock, flags);
4103 } 4103 }
4104 /*
4105 * Now perform the memory map of task->task_sg[] into backend
4106 * subsystem memory..
4107 */
4108 list_for_each_entry(task, &cmd->t_task_list, t_list) {
4109 if (atomic_read(&task->task_sent))
4110 continue;
4111 if (!dev->transport->map_data_SG)
4112 continue;
4113
4114 ret = dev->transport->map_data_SG(task);
4115 if (ret < 0)
4116 return 0;
4117 }
4118 4104
4119 return task_count; 4105 return task_count;
4120} 4106}
@@ -4126,7 +4112,6 @@ transport_allocate_control_task(struct se_cmd *cmd)
4126 unsigned char *cdb; 4112 unsigned char *cdb;
4127 struct se_task *task; 4113 struct se_task *task;
4128 unsigned long flags; 4114 unsigned long flags;
4129 int ret = 0;
4130 4115
4131 task = transport_generic_get_task(cmd, cmd->data_direction); 4116 task = transport_generic_get_task(cmd, cmd->data_direction);
4132 if (!task) 4117 if (!task)
@@ -4153,21 +4138,8 @@ transport_allocate_control_task(struct se_cmd *cmd)
4153 list_add_tail(&task->t_list, &cmd->t_task_list); 4138 list_add_tail(&task->t_list, &cmd->t_task_list);
4154 spin_unlock_irqrestore(&cmd->t_state_lock, flags); 4139 spin_unlock_irqrestore(&cmd->t_state_lock, flags);
4155 4140
4156 if (cmd->se_cmd_flags & SCF_SCSI_CONTROL_SG_IO_CDB) {
4157 if (dev->transport->map_control_SG)
4158 ret = dev->transport->map_control_SG(task);
4159 } else if (cmd->se_cmd_flags & SCF_SCSI_NON_DATA_CDB) {
4160 if (dev->transport->cdb_none)
4161 ret = dev->transport->cdb_none(task);
4162 } else {
4163 pr_err("target: Unknown control cmd type!\n");
4164 BUG();
4165 }
4166
4167 /* Success! Return number of tasks allocated */ 4141 /* Success! Return number of tasks allocated */
4168 if (ret == 0) 4142 return 1;
4169 return 1;
4170 return ret;
4171} 4143}
4172 4144
4173static u32 transport_allocate_tasks( 4145static u32 transport_allocate_tasks(