From: Lee Jones Date: Fri, 14 Aug 2020 11:39:24 +0000 (+0100) Subject: net: fddi: skfp: smt: Place definition of 'smt_pdef' under same stipulations as its use X-Git-Tag: v5.15~3062^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=327afdd7c0d13695e8fcbaa0995d451b34c3107b;p=platform%2Fkernel%2Flinux-starfive.git net: fddi: skfp: smt: Place definition of 'smt_pdef' under same stipulations 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" Cc: Jakub Kicinski Cc: Tetsuo Handa Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller --- diff --git a/drivers/net/fddi/skfp/smt.c b/drivers/net/fddi/skfp/smt.c index b8c59d8..a151d33 100644 --- a/drivers/net/fddi/skfp/smt.c +++ b/drivers/net/fddi/skfp/smt.c @@ -1561,7 +1561,7 @@ u_long smt_get_tid(struct s_smc *smc) return tid & 0x3fffffffL; } - +#ifdef LITTLE_ENDIAN /* * table of parameter lengths */ @@ -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[])