diff mbox

net: secure_seq: Move net_secret_init() definition into CONFIG_IPV6 if block

Message ID CAOMZO5ABxzh8iUKrkYy9sLbQhbcKHh-wheNDN+A8RmSyaVX+Ag@mail.gmail.com
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Fabio Estevam Oct. 5, 2013, 8:26 p.m. UTC
On Sat, Oct 5, 2013 at 5:09 PM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Commit 9a3bab6b05 (net: net_secret should not depend on TCP) introduced
> the following build warning when CONFIG_IPV6 is not selected:
>
> net/core/secure_seq.c:17:13: warning: 'net_secret_init' defined but not used [-Wunused-function]
>
> Fix it by moving net_secret_init(void) inside the '#if IS_ENABLED(CONFIG_IPV6)'
> block.
>
> Reported-by: Olof Johansson <olof@lixom.net>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Another solution would be:

the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 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)
 #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

If this is preferred, I can send a v2 like that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in