diff options
| author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-03-14 07:06:02 -0400 |
|---|---|---|
| committer | James Bottomley <James.Bottomley@suse.de> | 2011-03-23 12:36:32 -0400 |
| commit | 35ce9e26d7e0674892f77a9172c898dfcba50064 (patch) | |
| tree | b37702735fc5e01c64e03342d5adab79caa492ed /include | |
| parent | 5dd7ed2e811d5cd12f31fb7f0c5ad0107d494a12 (diff) | |
[SCSI] target: Remove spurious double cast from structure macro accessors
Reported-by: Fubo Chen <fubo.chen@gmail.com>
Cc: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include')
| -rw-r--r-- | include/target/target_core_base.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index bc93b7819eba..b3a62e451313 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -494,8 +494,8 @@ struct se_task { | |||
| 494 | struct list_head t_state_list; | 494 | struct list_head t_state_list; |
| 495 | } ____cacheline_aligned; | 495 | } ____cacheline_aligned; |
| 496 | 496 | ||
| 497 | #define TASK_CMD(task) ((struct se_cmd *)task->task_se_cmd) | 497 | #define TASK_CMD(task) ((task)->task_se_cmd) |
| 498 | #define TASK_DEV(task) ((struct se_device *)task->se_dev) | 498 | #define TASK_DEV(task) ((task)->se_dev) |
| 499 | 499 | ||
| 500 | struct se_cmd { | 500 | struct se_cmd { |
| 501 | /* SAM response code being sent to initiator */ | 501 | /* SAM response code being sent to initiator */ |
| @@ -551,8 +551,8 @@ struct se_cmd { | |||
| 551 | void (*transport_complete_callback)(struct se_cmd *); | 551 | void (*transport_complete_callback)(struct se_cmd *); |
| 552 | } ____cacheline_aligned; | 552 | } ____cacheline_aligned; |
| 553 | 553 | ||
| 554 | #define T_TASK(cmd) ((struct se_transport_task *)(cmd->t_task)) | 554 | #define T_TASK(cmd) ((cmd)->t_task) |
| 555 | #define CMD_TFO(cmd) ((struct target_core_fabric_ops *)cmd->se_tfo) | 555 | #define CMD_TFO(cmd) ((cmd)->se_tfo) |
| 556 | 556 | ||
| 557 | struct se_tmr_req { | 557 | struct se_tmr_req { |
| 558 | /* Task Management function to be preformed */ | 558 | /* Task Management function to be preformed */ |
| @@ -615,8 +615,8 @@ struct se_session { | |||
| 615 | struct list_head sess_acl_list; | 615 | struct list_head sess_acl_list; |
| 616 | } ____cacheline_aligned; | 616 | } ____cacheline_aligned; |
| 617 | 617 | ||
| 618 | #define SE_SESS(cmd) ((struct se_session *)(cmd)->se_sess) | 618 | #define SE_SESS(cmd) ((cmd)->se_sess) |
| 619 | #define SE_NODE_ACL(sess) ((struct se_node_acl *)(sess)->se_node_acl) | 619 | #define SE_NODE_ACL(sess) ((sess)->se_node_acl) |
| 620 | 620 | ||
| 621 | struct se_device; | 621 | struct se_device; |
| 622 | struct se_transform_info; | 622 | struct se_transform_info; |
| @@ -803,8 +803,8 @@ struct se_device { | |||
| 803 | struct list_head g_se_dev_list; | 803 | struct list_head g_se_dev_list; |
| 804 | } ____cacheline_aligned; | 804 | } ____cacheline_aligned; |
| 805 | 805 | ||
| 806 | #define SE_DEV(cmd) ((struct se_device *)(cmd)->se_lun->lun_se_dev) | 806 | #define SE_DEV(cmd) ((cmd)->se_lun->lun_se_dev) |
| 807 | #define SU_DEV(dev) ((struct se_subsystem_dev *)(dev)->se_sub_dev) | 807 | #define SU_DEV(dev) ((dev)->se_sub_dev) |
| 808 | #define DEV_ATTRIB(dev) (&(dev)->se_sub_dev->se_dev_attrib) | 808 | #define DEV_ATTRIB(dev) (&(dev)->se_sub_dev->se_dev_attrib) |
| 809 | #define DEV_T10_WWN(dev) (&(dev)->se_sub_dev->t10_wwn) | 809 | #define DEV_T10_WWN(dev) (&(dev)->se_sub_dev->t10_wwn) |
| 810 | 810 | ||
| @@ -832,7 +832,7 @@ struct se_hba { | |||
| 832 | struct se_subsystem_api *transport; | 832 | struct se_subsystem_api *transport; |
| 833 | } ____cacheline_aligned; | 833 | } ____cacheline_aligned; |
| 834 | 834 | ||
| 835 | #define SE_HBA(d) ((struct se_hba *)(d)->se_hba) | 835 | #define SE_HBA(dev) ((dev)->se_hba) |
| 836 | 836 | ||
| 837 | struct se_lun { | 837 | struct se_lun { |
| 838 | /* See transport_lun_status_table */ | 838 | /* See transport_lun_status_table */ |
| @@ -852,7 +852,7 @@ struct se_lun { | |||
| 852 | struct se_port *lun_sep; | 852 | struct se_port *lun_sep; |
| 853 | } ____cacheline_aligned; | 853 | } ____cacheline_aligned; |
| 854 | 854 | ||
| 855 | #define SE_LUN(c) ((struct se_lun *)(c)->se_lun) | 855 | #define SE_LUN(cmd) ((cmd)->se_lun) |
| 856 | 856 | ||
| 857 | struct scsi_port_stats { | 857 | struct scsi_port_stats { |
| 858 | u64 cmd_pdus; | 858 | u64 cmd_pdus; |
| @@ -919,7 +919,7 @@ struct se_portal_group { | |||
| 919 | struct config_group tpg_param_group; | 919 | struct config_group tpg_param_group; |
| 920 | } ____cacheline_aligned; | 920 | } ____cacheline_aligned; |
| 921 | 921 | ||
| 922 | #define TPG_TFO(se_tpg) ((struct target_core_fabric_ops *)(se_tpg)->se_tpg_tfo) | 922 | #define TPG_TFO(se_tpg) ((se_tpg)->se_tpg_tfo) |
| 923 | 923 | ||
| 924 | struct se_wwn { | 924 | struct se_wwn { |
| 925 | struct target_fabric_configfs *wwn_tf; | 925 | struct target_fabric_configfs *wwn_tf; |
