Skip to content

Commit

Permalink
isci: kill some long macros
Browse files Browse the repository at this point in the history
Delete some macros that are longer to type than the open coded operation
that they perform.

scic_sds_phy_get_base_state_machine
scic_sds_phy_get_starting_substate_machine
scic_sds_port_get_base_state_machine
scic_sds_port_get_ready_substate_machine
scic_sds_remote_device_get_base_state_machine
scic_sds_remote_device_get_ready_substate_machine
scic_sds_remote_node_context_set_remote_node_index
scic_sds_controller_get_base_state_machine

Also performs some collateral cleanups like killing casts that assume
structure member ordering, and consolidating a lot of duplicated default
handler code (the primary callers of the *_get_base_state_machine macros) via
a helper.

Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Dan Williams committed Jul 3, 2011
1 parent f942f32 commit 068b2c0
Show file tree
Hide file tree
Showing 9 changed files with 389 additions and 1,294 deletions.
259 changes: 60 additions & 199 deletions drivers/scsi/isci/core/scic_sds_controller.c

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions drivers/scsi/isci/core/scic_sds_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,6 @@ extern const struct sci_base_state scic_sds_controller_state_table[];
} \
}

/**
* scic_sds_controller_get_base_state_machine() -
*
* This is a helper macro that gets the base state machine for the controller
* object
*/
#define scic_sds_controller_get_base_state_machine(this_controller) \
(&(this_controller)->parent.state_machine)

/**
* scic_sds_controller_get_port_configuration_agent() -
*
Expand Down
Loading

0 comments on commit 068b2c0

Please sign in to comment.