Skip to content

Commit

Permalink
net: fddi: skfp: smt: Place definition of 'smt_pdef' under same stipu…
Browse files Browse the repository at this point in the history
…lations as its use

The variable 'smt_pdef' is only used if LITTLE_ENDIAN is set, so only
define it if this is the case.

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

 drivers/net/fddi/skfp/smt.c:1572:3: warning: ‘smt_pdef’ defined but not used [-Wunused-const-variable=]

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
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 026ff46 commit 327afdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/fddi/skfp/smt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ u_long smt_get_tid(struct s_smc *smc)
return tid & 0x3fffffffL;
}


#ifdef LITTLE_ENDIAN
/*
* table of parameter lengths
*/
Expand Down Expand Up @@ -1641,6 +1641,7 @@ static const struct smt_pdef {
} ;

#define N_SMT_PLEN ARRAY_SIZE(smt_pdef)
#endif

int smt_check_para(struct s_smc *smc, struct smt_header *sm,
const u_short list[])
Expand Down

0 comments on commit 327afdd

Please sign in to comment.