Message ID | 1381006619-17126-2-git-send-email-festevam@gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Fabio Estevam <festevam@gmail.com> Date: Sat, 5 Oct 2013 17:56:59 -0300 > From: Fabio Estevam <fabio.estevam@freescale.com> > > 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: ... > 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> > --- > Changes since v1: > - Add #if IS_ENABLED(CONFIG_IPV6) || IS_ENABLED(CONFIG_INET) This looks a lot better, applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c index 3f1ec15..8d9d05e 100644 --- a/net/core/secure_seq.c +++ b/net/core/secure_seq.c @@ -10,6 +10,7 @@ #include <net/secure_seq.h> +#if IS_ENABLED(CONFIG_IPV6) || IS_ENABLED(CONFIG_INET) #define NET_SECRET_SIZE (MD5_MESSAGE_BYTES / 4) static u32 net_secret[NET_SECRET_SIZE] ____cacheline_aligned; @@ -29,6 +30,7 @@ static void net_secret_init(void) cmpxchg(&net_secret[--i], 0, tmp); } } +#endif #ifdef CONFIG_INET static u32 seq_scale(u32 seq)