Skip to content

Commit 327afdd

Browse files
Lee Jonesdavem330
authored andcommitted
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" <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 026ff46 commit 327afdd

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

drivers/net/fddi/skfp/smt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ u_long smt_get_tid(struct s_smc *smc)
15611561
return tid & 0x3fffffffL;
15621562
}
15631563

1564-
1564+
#ifdef LITTLE_ENDIAN
15651565
/*
15661566
* table of parameter lengths
15671567
*/
@@ -1641,6 +1641,7 @@ static const struct smt_pdef {
16411641
} ;
16421642

16431643
#define N_SMT_PLEN ARRAY_SIZE(smt_pdef)
1644+
#endif
16441645

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

0 commit comments

Comments
 (0)