netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: Silence seq_scale() unused warning
@ 2011-12-05 18:29 Stephen Boyd
  2011-12-06  5:31 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2011-12-05 18:29 UTC (permalink / raw)
  To: David S . Miller; +Cc: linux-kernel, netdev

On a CONFIG_NET=y build

net/core/secure_seq.c:22: warning: 'seq_scale' defined but not
used

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---

I don't know how realistic this configuration is, but here it goes.

 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 025233d..db12233 100644
--- a/net/core/secure_seq.c
+++ b/net/core/secure_seq.c
@@ -19,6 +19,7 @@ static int __init net_secret_init(void)
 }
 late_initcall(net_secret_init);
 
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) || defined(CONFIG_INET)
 static u32 seq_scale(u32 seq)
 {
 	/*
@@ -33,6 +34,7 @@ static u32 seq_scale(u32 seq)
 	 */
 	return seq + (ktime_to_ns(ktime_get_real()) >> 6);
 }
+#endif
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 __u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr,
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: Silence seq_scale() unused warning
  2011-12-05 18:29 [PATCH] net: Silence seq_scale() unused warning Stephen Boyd
@ 2011-12-06  5:31 ` David Miller
  2011-12-06 18:04   ` [PATCHv2] " Stephen Boyd
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2011-12-06  5:31 UTC (permalink / raw)
  To: sboyd; +Cc: linux-kernel, netdev

From: Stephen Boyd <sboyd@codeaurora.org>
Date: Mon,  5 Dec 2011 10:29:56 -0800

> On a CONFIG_NET=y build
> 
> net/core/secure_seq.c:22: warning: 'seq_scale' defined but not
> used
> 
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
> 
> I don't know how realistic this configuration is, but here it goes.

Just test INET all by itself, IPV6 will always need the INET
infrastructure for hash tables and inet socket management even in the
extremely unlikely event that we make ipv4 independently selectable at
some point.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCHv2] net: Silence seq_scale() unused warning
  2011-12-06  5:31 ` David Miller
@ 2011-12-06 18:04   ` Stephen Boyd
  2011-12-06 19:00     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2011-12-06 18:04 UTC (permalink / raw)
  To: David S . Miller; +Cc: linux-kernel, netdev

On a CONFIG_NET=y build

net/core/secure_seq.c:22: warning: 'seq_scale' defined but not
used

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---

On 12/5/2011 9:31 PM, David Miller wrote:
> Just test INET all by itself, IPV6 will always need the INET
> infrastructure for hash tables and inet socket management even in the
> extremely unlikely event that we make ipv4 independently selectable at
> some point.

Ok.

 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 025233d..925991a 100644
--- a/net/core/secure_seq.c
+++ b/net/core/secure_seq.c
@@ -19,6 +19,7 @@ static int __init net_secret_init(void)
 }
 late_initcall(net_secret_init);
 
+#ifdef CONFIG_INET
 static u32 seq_scale(u32 seq)
 {
 	/*
@@ -33,6 +34,7 @@ static u32 seq_scale(u32 seq)
 	 */
 	return seq + (ktime_to_ns(ktime_get_real()) >> 6);
 }
+#endif
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 __u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr,
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCHv2] net: Silence seq_scale() unused warning
  2011-12-06 18:04   ` [PATCHv2] " Stephen Boyd
@ 2011-12-06 19:00     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-12-06 19:00 UTC (permalink / raw)
  To: sboyd; +Cc: linux-kernel, netdev

From: Stephen Boyd <sboyd@codeaurora.org>
Date: Tue,  6 Dec 2011 10:04:40 -0800

> On a CONFIG_NET=y build
> 
> net/core/secure_seq.c:22: warning: 'seq_scale' defined but not
> used
> 
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-06 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-05 18:29 [PATCH] net: Silence seq_scale() unused warning Stephen Boyd
2011-12-06  5:31 ` David Miller
2011-12-06 18:04   ` [PATCHv2] " Stephen Boyd
2011-12-06 19:00     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).