diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-05-12 15:00:31 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 13:04:48 +0200 |
commit | 4f20ef4f57aa52fd3356c143a8f3d2bd18dc61fc (patch) | |
tree | 27c2c01305cad71eb6ebaf96e67ad3ce8d834c30 /drivers/scsi/isci/phy.c | |
parent | isci: unify phy consume_power handlers (diff) | |
download | linux-4f20ef4f57aa52fd3356c143a8f3d2bd18dc61fc.tar.xz linux-4f20ef4f57aa52fd3356c143a8f3d2bd18dc61fc.zip |
isci: clarify phy to port lookups
While cleaning up the driver it is very tempting to convert scic_sds_get_*
macros to their open coded equivalent. They are all just pointer dereferences
*except* scic_sds_phy_get_port() which returns NULL if the phy is assigned to
the dummy port. Clarify this by renaming it to phy_get_non_dummy_port().
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/phy.c')
-rw-r--r-- | drivers/scsi/isci/phy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c index 9a5ec375f767..8bd1a85f621e 100644 --- a/drivers/scsi/isci/phy.c +++ b/drivers/scsi/isci/phy.c @@ -287,7 +287,7 @@ static void scic_sds_phy_sata_timeout(void *phy) * port (i.e. it's contained in the dummy port). !NULL All other * values indicate a handle/pointer to the port containing the phy. */ -struct scic_sds_port *scic_sds_phy_get_port( +struct scic_sds_port *phy_get_non_dummy_port( struct scic_sds_phy *sci_phy) { if (scic_sds_port_get_index(sci_phy->owning_port) == SCIC_SDS_DUMMY_PORT) @@ -893,7 +893,7 @@ enum sci_status scic_sds_phy_event_handler(struct scic_sds_phy *sci_phy, break; case SCU_EVENT_BROADCAST_CHANGE: /* Broadcast change received. Notify the port. */ - if (scic_sds_phy_get_port(sci_phy) != NULL) + if (phy_get_non_dummy_port(sci_phy) != NULL) scic_sds_port_broadcast_change_received(sci_phy->owning_port, sci_phy); else sci_phy->bcn_received_while_port_unassigned = true; @@ -1238,7 +1238,7 @@ static void scic_sds_phy_stopped_state_enter(void *object) if (sci_phy->state_machine.previous_state_id != SCI_BASE_PHY_STATE_INITIAL) scic_sds_controller_link_down(scic_sds_phy_get_controller(sci_phy), - scic_sds_phy_get_port(sci_phy), + phy_get_non_dummy_port(sci_phy), sci_phy); } @@ -1255,7 +1255,7 @@ static void scic_sds_phy_starting_state_enter(void *object) if (sci_phy->state_machine.previous_state_id == SCI_BASE_PHY_STATE_READY) scic_sds_controller_link_down(scic_sds_phy_get_controller(sci_phy), - scic_sds_phy_get_port(sci_phy), + phy_get_non_dummy_port(sci_phy), sci_phy); sci_base_state_machine_change_state(&sci_phy->state_machine, @@ -1267,7 +1267,7 @@ static void scic_sds_phy_ready_state_enter(void *object) struct scic_sds_phy *sci_phy = object; scic_sds_controller_link_up(scic_sds_phy_get_controller(sci_phy), - scic_sds_phy_get_port(sci_phy), + phy_get_non_dummy_port(sci_phy), sci_phy); } |