Skip to content

Commit

Permalink
net: fddi: skfp: cfm: Remove set but unused variable 'oldstate'
Browse files Browse the repository at this point in the history
While we're at it, remove some code which has never been invoked.

Keep the comment though, as it seems potentially half useful.

Fixes the following W=1 kernel build warning(s):

 drivers/net/fddi/skfp/cfm.c: In function ‘cfm’:
 drivers/net/fddi/skfp/cfm.c:211:6: warning: variable ‘oldstate’ set but not used [-Wunused-but-set-variable]

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lee Jones authored and David S. Miller committed Aug 15, 2020
1 parent 7b1af34 commit d1ad06b
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions drivers/net/fddi/skfp/cfm.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ void cfm(struct s_smc *smc, int event)
{
int state ; /* remember last state */
int cond ;
int oldstate ;

/* We will do the following: */
/* - compute the variable WC_Flag for every port (This is where */
Expand All @@ -222,7 +221,6 @@ void cfm(struct s_smc *smc, int event)
/* - change the portstates */
cem_priv_state (smc, event);

oldstate = smc->mib.fddiSMTCF_State ;
do {
DB_CFM("CFM : state %s%s event %s",
smc->mib.fddiSMTCF_State & AFLAG ? "ACTIONS " : "",
Expand Down Expand Up @@ -250,18 +248,11 @@ void cfm(struct s_smc *smc, int event)
if (cond != smc->mib.fddiSMTPeerWrapFlag)
smt_srf_event(smc,SMT_COND_SMT_PEER_WRAP,0,cond) ;

#if 0
/*
* Don't send ever MAC_PATH_CHANGE events. Our MAC is hard-wired
* Don't ever send MAC_PATH_CHANGE events. Our MAC is hard-wired
* to the primary path.
*/
/*
* path change
*/
if (smc->mib.fddiSMTCF_State != oldstate) {
smt_srf_event(smc,SMT_EVENT_MAC_PATH_CHANGE,INDEX_MAC,0) ;
}
#endif

#endif /* no SLIM_SMT */

/*
Expand Down

0 comments on commit d1ad06b

Please sign in to comment.