diff options
author | Andy Grover <agrover@redhat.com> | 2011-07-19 04:55:10 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-07-22 05:37:43 -0400 |
commit | e3d6f909ed803d92a5ac9b4a2c087e0eae9b90d0 (patch) | |
tree | 2eb65e958a2cc35c896a0e184ec09edcb9076b3b /drivers/target/tcm_fc/tfc_cmd.c | |
parent | a8c6da90b823fb94ca76ca0df6bb44e6e205dc87 (diff) |
target: Core cleanups from AGrover (round 1)
This patch contains the squashed version of a number of cleanups and
minor fixes from Andy's initial series (round 1) for target core this
past spring. The condensed log looks like:
target: use errno values instead of returning -1 for everything
target: Rename transport_calc_sg_num to transport_init_task_sg
target: Fix leak in error path in transport_init_task_sg
target/pscsi: Remove pscsi_get_sh() usage
target: Make two runtime checks into WARN_ONs
target: Remove hba queue depth and convert to spin_lock_irq usage
target: dev->dev_status_queue_obj is unused
target: Make struct se_queue_req.cmd type struct se_cmd *
target: Remove __transport_get_qr_from_queue()
target: Rename se_dev->g_se_dev_list to se_dev_node
target: Remove struct se_global
target: Simplify scsi mib index table code
target: Make dev_queue_obj a member of se_device instead of a pointer
target: remove extraneous returns at end of void functions
target: Ensure transport_dump_vpd_ident_type returns null-terminated str
target: Function pointers don't need to use '&' to be assigned
target: Fix comment in __transport_execute_tasks()
target: Misc style cleanups
target: rename struct pr_reservation_template to pr_reservation
target: Remove #defines that just perform indirection
target: Inline transport_get_task_from_execute_queue()
target: Minor header comment fixes
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc/tfc_cmd.c')
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index 92a449aededa..19b2b9948314 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -72,7 +72,7 @@ void ft_dump_cmd(struct ft_cmd *cmd, const char *caller) | |||
72 | caller, cmd, cmd->cdb); | 72 | caller, cmd, cmd->cdb); |
73 | printk(KERN_INFO "%s: cmd %p lun %d\n", caller, cmd, cmd->lun); | 73 | printk(KERN_INFO "%s: cmd %p lun %d\n", caller, cmd, cmd->lun); |
74 | 74 | ||
75 | task = T_TASK(se_cmd); | 75 | task = se_cmd->t_task; |
76 | printk(KERN_INFO "%s: cmd %p task %p se_num %u buf %p len %u se_cmd_flags <0x%x>\n", | 76 | printk(KERN_INFO "%s: cmd %p task %p se_num %u buf %p len %u se_cmd_flags <0x%x>\n", |
77 | caller, cmd, task, task->t_tasks_se_num, | 77 | caller, cmd, task, task->t_tasks_se_num, |
78 | task->t_task_buf, se_cmd->data_length, se_cmd->se_cmd_flags); | 78 | task->t_task_buf, se_cmd->data_length, se_cmd->se_cmd_flags); |
@@ -262,9 +262,9 @@ int ft_write_pending(struct se_cmd *se_cmd) | |||
262 | * TCM/LIO target | 262 | * TCM/LIO target |
263 | */ | 263 | */ |
264 | transport_do_task_sg_chain(se_cmd); | 264 | transport_do_task_sg_chain(se_cmd); |
265 | cmd->sg = T_TASK(se_cmd)->t_tasks_sg_chained; | 265 | cmd->sg = se_cmd->t_task->t_tasks_sg_chained; |
266 | cmd->sg_cnt = | 266 | cmd->sg_cnt = |
267 | T_TASK(se_cmd)->t_tasks_sg_chained_no; | 267 | se_cmd->t_task->t_tasks_sg_chained_no; |
268 | } | 268 | } |
269 | if (cmd->sg && lport->tt.ddp_setup(lport, ep->xid, | 269 | if (cmd->sg && lport->tt.ddp_setup(lport, ep->xid, |
270 | cmd->sg, cmd->sg_cnt)) | 270 | cmd->sg, cmd->sg_cnt)) |
@@ -670,7 +670,6 @@ static void ft_send_cmd(struct ft_cmd *cmd) | |||
670 | 670 | ||
671 | err: | 671 | err: |
672 | ft_send_resp_code(cmd, FCP_CMND_FIELDS_INVALID); | 672 | ft_send_resp_code(cmd, FCP_CMND_FIELDS_INVALID); |
673 | return; | ||
674 | } | 673 | } |
675 | 674 | ||
676 | /* | 675 | /* |