[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1iTnrD-00059f-Iz@rmk-PC.armlinux.org.uk>
Date: Sun, 10 Nov 2019 14:06:23 +0000
From: Russell King <rmk+kernel@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: [PATCH net-next 03/17] net: sfp: rename sfp_sm_ins_next() as
sfp_sm_mod_next()
sfp_sm_ins_next() modifies the module state machine. Change it's name
to reflect this.
Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
---
drivers/net/phy/sfp.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 47f204b227e8..f56a19b26924 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -1182,7 +1182,7 @@ static void sfp_sm_next(struct sfp *sfp, unsigned int state,
sfp_sm_set_timer(sfp, timeout);
}
-static void sfp_sm_ins_next(struct sfp *sfp, unsigned int state,
+static void sfp_sm_mod_next(struct sfp *sfp, unsigned int state,
unsigned int timeout)
{
sfp->sm_mod_state = state;
@@ -1506,22 +1506,22 @@ static void sfp_sm_module(struct sfp *sfp, unsigned int event)
default:
if (event == SFP_E_INSERT && sfp->attached) {
sfp_module_tx_disable(sfp);
- sfp_sm_ins_next(sfp, SFP_MOD_PROBE, T_PROBE_INIT);
+ sfp_sm_mod_next(sfp, SFP_MOD_PROBE, T_PROBE_INIT);
}
break;
case SFP_MOD_PROBE:
if (event == SFP_E_REMOVE) {
- sfp_sm_ins_next(sfp, SFP_MOD_EMPTY, 0);
+ sfp_sm_mod_next(sfp, SFP_MOD_EMPTY, 0);
} else if (event == SFP_E_TIMEOUT) {
int val = sfp_sm_mod_probe(sfp);
if (val == 0)
- sfp_sm_ins_next(sfp, SFP_MOD_PRESENT, 0);
+ sfp_sm_mod_next(sfp, SFP_MOD_PRESENT, 0);
else if (val > 0)
- sfp_sm_ins_next(sfp, SFP_MOD_HPOWER, val);
+ sfp_sm_mod_next(sfp, SFP_MOD_HPOWER, val);
else if (val != -EAGAIN)
- sfp_sm_ins_next(sfp, SFP_MOD_ERROR, 0);
+ sfp_sm_mod_next(sfp, SFP_MOD_ERROR, 0);
else
sfp_sm_set_timer(sfp, T_PROBE_RETRY);
}
@@ -1529,7 +1529,7 @@ static void sfp_sm_module(struct sfp *sfp, unsigned int event)
case SFP_MOD_HPOWER:
if (event == SFP_E_TIMEOUT) {
- sfp_sm_ins_next(sfp, SFP_MOD_PRESENT, 0);
+ sfp_sm_mod_next(sfp, SFP_MOD_PRESENT, 0);
break;
}
/* fallthrough */
@@ -1537,7 +1537,7 @@ static void sfp_sm_module(struct sfp *sfp, unsigned int event)
case SFP_MOD_ERROR:
if (event == SFP_E_REMOVE) {
sfp_sm_mod_remove(sfp);
- sfp_sm_ins_next(sfp, SFP_MOD_EMPTY, 0);
+ sfp_sm_mod_next(sfp, SFP_MOD_EMPTY, 0);
}
break;
}
--
2.20.1
Powered by blists - more mailing lists