[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5ABxzh8iUKrkYy9sLbQhbcKHh-wheNDN+A8RmSyaVX+Ag@mail.gmail.com>
Date: Sat, 5 Oct 2013 17:26:59 -0300
From: Fabio Estevam <festevam@...il.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: edumazet <edumazet@...gle.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Olof Johansson <olof@...om.net>,
Fabio Estevam <fabio.estevam@...escale.com>,
Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: Re: [PATCH] net: secure_seq: Move net_secret_init() definition into
CONFIG_IPV6 if block
On Sat, Oct 5, 2013 at 5:09 PM, Fabio Estevam <festevam@...il.com> wrote:
> From: Fabio Estevam <fabio.estevam@...escale.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@...om.net>
> Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
Another solution would be:
--- 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
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists