Skip to content

Commit d1ad06b

Browse files
Lee Jonesdavem330
authored andcommitted
net: fddi: skfp: cfm: Remove set but unused variable 'oldstate'
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" <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7b1af34 commit d1ad06b

File tree

1 file changed

+2
-11
lines changed
  • drivers/net/fddi/skfp

1 file changed

+2
-11
lines changed

drivers/net/fddi/skfp/cfm.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ void cfm(struct s_smc *smc, int event)
208208
{
209209
int state ; /* remember last state */
210210
int cond ;
211-
int oldstate ;
212211

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

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

253-
#if 0
254251
/*
255-
* Don't send ever MAC_PATH_CHANGE events. Our MAC is hard-wired
252+
* Don't ever send MAC_PATH_CHANGE events. Our MAC is hard-wired
256253
* to the primary path.
257254
*/
258-
/*
259-
* path change
260-
*/
261-
if (smc->mib.fddiSMTCF_State != oldstate) {
262-
smt_srf_event(smc,SMT_EVENT_MAC_PATH_CHANGE,INDEX_MAC,0) ;
263-
}
264-
#endif
255+
265256
#endif /* no SLIM_SMT */
266257

267258
/*

0 commit comments

Comments
 (0)