diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-10-05 16:56:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-09 12:59:57 -0400 |
commit | cb03db9d0e964568407fb08ea46cc2b6b7f67587 (patch) | |
tree | e661291e29bbde4afa96f521e1b421cf6058251d /net | |
parent | 9684d7b0dab3cf3a897edd85dca501d413888d56 (diff) |
net: secure_seq: Fix warning when CONFIG_IPV6 and CONFIG_INET are not selected
net_secret() is only used when CONFIG_IPV6 or CONFIG_INET are selected.
Building a defconfig with both of these symbols unselected (Using the ARM
at91sam9rl_defconfig, for example) leads to the following build warning:
$ make at91sam9rl_defconfig
#
# configuration written to .config
#
$ make net/core/secure_seq.o
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CC net/core/secure_seq.o
net/core/secure_seq.c:17:13: warning: 'net_secret_init' defined but not used [-Wunused-function]
Fix this warning by protecting the definition of net_secret() with these
symbols.
Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/secure_seq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c index 3f1ec1586ae1..8d9d05edd2eb 100644 --- a/net/core/secure_seq.c +++ b/net/core/secure_seq.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <net/secure_seq.h> | 11 | #include <net/secure_seq.h> |
12 | 12 | ||
13 | #if IS_ENABLED(CONFIG_IPV6) || IS_ENABLED(CONFIG_INET) | ||
13 | #define NET_SECRET_SIZE (MD5_MESSAGE_BYTES / 4) | 14 | #define NET_SECRET_SIZE (MD5_MESSAGE_BYTES / 4) |
14 | 15 | ||
15 | static u32 net_secret[NET_SECRET_SIZE] ____cacheline_aligned; | 16 | static u32 net_secret[NET_SECRET_SIZE] ____cacheline_aligned; |
@@ -29,6 +30,7 @@ static void net_secret_init(void) | |||
29 | cmpxchg(&net_secret[--i], 0, tmp); | 30 | cmpxchg(&net_secret[--i], 0, tmp); |
30 | } | 31 | } |
31 | } | 32 | } |
33 | #endif | ||
32 | 34 | ||
33 | #ifdef CONFIG_INET | 35 | #ifdef CONFIG_INET |
34 | static u32 seq_scale(u32 seq) | 36 | static u32 seq_scale(u32 seq) |