All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] net: Kill ratelimit.h dependency in linux/net.h
@ 2011-05-26 20:43 David Miller
  2011-05-26 21:24 ` Joe Perches
  2011-05-27  8:44 ` Ingo Molnar
  0 siblings, 2 replies; 5+ messages in thread
From: David Miller @ 2011-05-26 20:43 UTC (permalink / raw)
  To: netdev; +Cc: mingo


Ingo Molnar noticed that we have this unnecessary ratelimit.h
dependency in linux/net.h, which hid compilation problems from
people doing builds only with CONFIG_NET enabled.

Move this stuff out to a seperate net/net_ratelimit.h file and
include that in the only two places where this thing is needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/linux/net.h        |    6 ------
 net/core/sysctl_net_core.c |    1 +
 net/core/utils.c           |    1 +
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/include/linux/net.h b/include/linux/net.h
index 1da55e9..b299230 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -289,11 +289,5 @@ extern int kernel_sock_shutdown(struct socket *sock,
 	MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \
 		     "-type-" __stringify(type))
 
-#ifdef CONFIG_SYSCTL
-#include <linux/sysctl.h>
-#include <linux/ratelimit.h>
-extern struct ratelimit_state net_ratelimit_state;
-#endif
-
 #endif /* __KERNEL__ */
 #endif	/* _LINUX_NET_H */
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index a829e3f..77a65f0 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -17,6 +17,7 @@
 
 #include <net/ip.h>
 #include <net/sock.h>
+#include <net/net_ratelimit.h>
 
 #ifdef CONFIG_RPS
 static int rps_sock_flow_sysctl(ctl_table *table, int write,
diff --git a/net/core/utils.c b/net/core/utils.c
index 2012bc7..386e263f 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -27,6 +27,7 @@
 #include <linux/ratelimit.h>
 
 #include <net/sock.h>
+#include <net/net_ratelimit.h>
 
 #include <asm/byteorder.h>
 #include <asm/system.h>
-- 
1.7.4.4


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

* Re: [PATCH 3/3] net: Kill ratelimit.h dependency in linux/net.h
  2011-05-26 20:43 [PATCH 3/3] net: Kill ratelimit.h dependency in linux/net.h David Miller
@ 2011-05-26 21:24 ` Joe Perches
  2011-05-27  2:40   ` David Miller
  2011-05-27  8:44 ` Ingo Molnar
  1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2011-05-26 21:24 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, mingo

On Thu, 2011-05-26 at 16:43 -0400, David Miller wrote:
> Ingo Molnar noticed that we have this unnecessary ratelimit.h
> dependency in linux/net.h, which hid compilation problems from
> people doing builds only with CONFIG_NET enabled.
> 
> Move this stuff out to a seperate net/net_ratelimit.h file and
> include that in the only two places where this thing is needed.

git add net/net_ratelimit.h?

> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  include/linux/net.h        |    6 ------
>  net/core/sysctl_net_core.c |    1 +
>  net/core/utils.c           |    1 +



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

* Re: [PATCH 3/3] net: Kill ratelimit.h dependency in linux/net.h
  2011-05-26 21:24 ` Joe Perches
@ 2011-05-27  2:40   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2011-05-27  2:40 UTC (permalink / raw)
  To: joe; +Cc: netdev, mingo

From: Joe Perches <joe@perches.com>
Date: Thu, 26 May 2011 14:24:04 -0700

> On Thu, 2011-05-26 at 16:43 -0400, David Miller wrote:
>> Ingo Molnar noticed that we have this unnecessary ratelimit.h
>> dependency in linux/net.h, which hid compilation problems from
>> people doing builds only with CONFIG_NET enabled.
>> 
>> Move this stuff out to a seperate net/net_ratelimit.h file and
>> include that in the only two places where this thing is needed.
> 
> git add net/net_ratelimit.h?

Good catch :-)  It's contents are essentially what were being
deleted from linux/net.h :-)

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

* Re: [PATCH 3/3] net: Kill ratelimit.h dependency in linux/net.h
  2011-05-26 20:43 [PATCH 3/3] net: Kill ratelimit.h dependency in linux/net.h David Miller
  2011-05-26 21:24 ` Joe Perches
@ 2011-05-27  8:44 ` Ingo Molnar
  2011-05-27 17:42   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2011-05-27  8:44 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


* David Miller <davem@davemloft.net> wrote:

> Ingo Molnar noticed that we have this unnecessary ratelimit.h
> dependency in linux/net.h, which hid compilation problems from
> people doing builds only with CONFIG_NET enabled.
> 
> Move this stuff out to a seperate net/net_ratelimit.h file and
> include that in the only two places where this thing is needed.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  include/linux/net.h        |    6 ------
>  net/core/sysctl_net_core.c |    1 +
>  net/core/utils.c           |    1 +
>  3 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/net.h b/include/linux/net.h
> index 1da55e9..b299230 100644
> --- a/include/linux/net.h
> +++ b/include/linux/net.h
> @@ -289,11 +289,5 @@ extern int kernel_sock_shutdown(struct socket *sock,
>  	MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \
>  		     "-type-" __stringify(type))
>  
> -#ifdef CONFIG_SYSCTL
> -#include <linux/sysctl.h>
> -#include <linux/ratelimit.h>
> -extern struct ratelimit_state net_ratelimit_state;
> -#endif
> -

Assuming that this moved into net_ratelimit.h with a guard define 
this looks good to me:

Acked-by: Ingo Molnar <mingo@elte.hu>

Thanks,

	Ingo

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

* Re: [PATCH 3/3] net: Kill ratelimit.h dependency in linux/net.h
  2011-05-27  8:44 ` Ingo Molnar
@ 2011-05-27 17:42   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2011-05-27 17:42 UTC (permalink / raw)
  To: mingo; +Cc: netdev

From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 27 May 2011 10:44:03 +0200

>> diff --git a/include/linux/net.h b/include/linux/net.h
>> index 1da55e9..b299230 100644
>> --- a/include/linux/net.h
>> +++ b/include/linux/net.h
>> @@ -289,11 +289,5 @@ extern int kernel_sock_shutdown(struct socket *sock,
>>  	MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \
>>  		     "-type-" __stringify(type))
>>  
>> -#ifdef CONFIG_SYSCTL
>> -#include <linux/sysctl.h>
>> -#include <linux/ratelimit.h>
>> -extern struct ratelimit_state net_ratelimit_state;
>> -#endif
>> -
> 
> Assuming that this moved into net_ratelimit.h with a guard define 
> this looks good to me:
> 
> Acked-by: Ingo Molnar <mingo@elte.hu>

Yep, thanks for reviewing!

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

end of thread, other threads:[~2011-05-27 17:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26 20:43 [PATCH 3/3] net: Kill ratelimit.h dependency in linux/net.h David Miller
2011-05-26 21:24 ` Joe Perches
2011-05-27  2:40   ` David Miller
2011-05-27  8:44 ` Ingo Molnar
2011-05-27 17:42   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.