summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/core/sci_base_phy.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-23 08:14:06 (GMT)
committerDan Williams <dan.j.williams@intel.com>2011-07-03 10:55:27 (GMT)
commit8f31550c77849250ec49d1509b6bb63b4ddc59e4 (patch)
tree380980cfaf7923b701a2cb95ba17071c9afa225a /drivers/scsi/isci/core/sci_base_phy.h
parent858d4aa741c80fb7579cda3517853f0cffc73772 (diff)
downloadlinux-8f31550c77849250ec49d1509b6bb63b4ddc59e4.tar.xz
isci: phy state machine cleanup step1
c99 the struct initializers: 1/ allows grep to consistently show method name associations. The naming is mostly consistent (except when it isn't) so this guarantees coverage of present and future exception cases. 2/ let's the compiler guarantee that the state table array entry correlates with an actual state name and detect accidental reordering or deletion of states. / allows default handler's to be identified easily Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/core/sci_base_phy.h')
-rw-r--r--drivers/scsi/isci/core/sci_base_phy.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/scsi/isci/core/sci_base_phy.h b/drivers/scsi/isci/core/sci_base_phy.h
index 6c0d9bb..7e2c7e3 100644
--- a/drivers/scsi/isci/core/sci_base_phy.h
+++ b/drivers/scsi/isci/core/sci_base_phy.h
@@ -115,9 +115,6 @@ enum sci_base_phy_states {
* Simply the final state for the base phy state machine.
*/
SCI_BASE_PHY_STATE_FINAL,
-
- SCI_BASE_PHY_MAX_STATES
-
};
/**
@@ -138,9 +135,7 @@ struct sci_base_phy {
struct sci_base_state_machine state_machine;
};
-typedef enum sci_status (*SCI_BASE_PHY_HANDLER_T)(
- struct sci_base_phy *
- );
+typedef enum sci_status (*sci_base_phy_handler_t)(struct sci_base_phy *);
/**
* struct sci_base_phy_state_handler - This structure contains all of the state
@@ -155,25 +150,25 @@ struct sci_base_phy_state_handler {
* The start_handler specifies the method invoked when there is an
* attempt to start a phy.
*/
- SCI_BASE_PHY_HANDLER_T start_handler;
+ sci_base_phy_handler_t start_handler;
/**
* The stop_handler specifies the method invoked when there is an
* attempt to stop a phy.
*/
- SCI_BASE_PHY_HANDLER_T stop_handler;
+ sci_base_phy_handler_t stop_handler;
/**
* The reset_handler specifies the method invoked when there is an
* attempt to reset a phy.
*/
- SCI_BASE_PHY_HANDLER_T reset_handler;
+ sci_base_phy_handler_t reset_handler;
/**
* The destruct_handler specifies the method invoked when attempting to
* destruct a phy.
*/
- SCI_BASE_PHY_HANDLER_T destruct_handler;
+ sci_base_phy_handler_t destruct_handler;
};