netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] net: netprio_cgroup: make net_prio_subsys static
@ 2011-12-08  5:17 John Fastabend
  2011-12-08 11:45 ` Neil Horman
  0 siblings, 1 reply; 6+ messages in thread
From: John Fastabend @ 2011-12-08  5:17 UTC (permalink / raw)
  To: davem, nhorman; +Cc: netdev

net_prio_subsys can be made static this removes the sparse
warning it was throwing.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---

 net/core/netprio_cgroup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
index 3a9fd48..ea16c8f 100644
--- a/net/core/netprio_cgroup.c
+++ b/net/core/netprio_cgroup.c
@@ -28,7 +28,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss,
 static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
 static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp);
 
-struct cgroup_subsys net_prio_subsys = {
+static struct cgroup_subsys net_prio_subsys = {
 	.name		= "net_prio",
 	.create		= cgrp_create,
 	.destroy	= cgrp_destroy,

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

* Re: [net-next PATCH] net: netprio_cgroup: make net_prio_subsys static
  2011-12-08  5:17 [net-next PATCH] net: netprio_cgroup: make net_prio_subsys static John Fastabend
@ 2011-12-08 11:45 ` Neil Horman
  2011-12-09  0:53   ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Horman @ 2011-12-08 11:45 UTC (permalink / raw)
  To: John Fastabend; +Cc: davem, netdev

On Wed, Dec 07, 2011 at 09:17:17PM -0800, John Fastabend wrote:
> net_prio_subsys can be made static this removes the sparse
> warning it was throwing.
> 
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> ---
> 
>  net/core/netprio_cgroup.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
> index 3a9fd48..ea16c8f 100644
> --- a/net/core/netprio_cgroup.c
> +++ b/net/core/netprio_cgroup.c
> @@ -28,7 +28,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss,
>  static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
>  static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp);
>  
> -struct cgroup_subsys net_prio_subsys = {
> +static struct cgroup_subsys net_prio_subsys = {
>  	.name		= "net_prio",
>  	.create		= cgrp_create,
>  	.destroy	= cgrp_destroy,
> 
> 

Thanks John.

Acked-by: Neil Horman <nhorman@tuxdriver.com>

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

* Re: [net-next PATCH] net: netprio_cgroup: make net_prio_subsys static
  2011-12-08 11:45 ` Neil Horman
@ 2011-12-09  0:53   ` David Miller
  2011-12-09 16:05     ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2011-12-09  0:53 UTC (permalink / raw)
  To: nhorman; +Cc: john.r.fastabend, netdev

From: Neil Horman <nhorman@tuxdriver.com>
Date: Thu, 8 Dec 2011 06:45:55 -0500

> On Wed, Dec 07, 2011 at 09:17:17PM -0800, John Fastabend wrote:
>> net_prio_subsys can be made static this removes the sparse
>> warning it was throwing.
>> 
>> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
 ...
> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied.

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

* Re: [net-next PATCH] net: netprio_cgroup: make net_prio_subsys static
  2011-12-09  0:53   ` David Miller
@ 2011-12-09 16:05     ` Eric Dumazet
  2011-12-09 16:31       ` John Fastabend
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2011-12-09 16:05 UTC (permalink / raw)
  To: David Miller; +Cc: nhorman, john.r.fastabend, netdev

Le jeudi 08 décembre 2011 à 19:53 -0500, David Miller a écrit :
> From: Neil Horman <nhorman@tuxdriver.com>
> Date: Thu, 8 Dec 2011 06:45:55 -0500
> 
> > On Wed, Dec 07, 2011 at 09:17:17PM -0800, John Fastabend wrote:
> >> net_prio_subsys can be made static this removes the sparse
> >> warning it was throwing.
> >> 
> >> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
>  ...
> > Acked-by: Neil Horman <nhorman@tuxdriver.com>
> 
> Applied.
> --

But it trivialy breaks the build ? Or am I mistaken ?


$ grep CONFIG_NETPRIO_CGROUP .config
CONFIG_NETPRIO_CGROUP=y

$ make net/core/netprio_cgroup.o
  CC      net/core/netprio_cgroup.o
net/core/netprio_cgroup.c:31:29: error: static declaration of ‘net_prio_subsys’ follows non-static declaration
include/linux/cgroup_subsys.h:71:1: note: previous declaration of ‘net_prio_subsys’ was here
make[1]: *** [net/core/netprio_cgroup.o] Error 1
make: *** [net/core/netprio_cgroup.o] Error 2

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

* Re: [net-next PATCH] net: netprio_cgroup: make net_prio_subsys static
  2011-12-09 16:05     ` Eric Dumazet
@ 2011-12-09 16:31       ` John Fastabend
  2011-12-09 16:40         ` Neil Horman
  0 siblings, 1 reply; 6+ messages in thread
From: John Fastabend @ 2011-12-09 16:31 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, nhorman@tuxdriver.com, netdev@vger.kernel.org

On 12/9/2011 8:05 AM, Eric Dumazet wrote:
> Le jeudi 08 décembre 2011 à 19:53 -0500, David Miller a écrit :
>> From: Neil Horman <nhorman@tuxdriver.com>
>> Date: Thu, 8 Dec 2011 06:45:55 -0500
>>
>>> On Wed, Dec 07, 2011 at 09:17:17PM -0800, John Fastabend wrote:
>>>> net_prio_subsys can be made static this removes the sparse
>>>> warning it was throwing.
>>>>
>>>> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
>>  ...
>>> Acked-by: Neil Horman <nhorman@tuxdriver.com>
>>
>> Applied.
>> --
> 
> But it trivialy breaks the build ? Or am I mistaken ?
> 

Dang. No your right. When its not built as a module it breaks. Sorry
I'll revert it.

> 
> $ grep CONFIG_NETPRIO_CGROUP .config
> CONFIG_NETPRIO_CGROUP=y
> 
> $ make net/core/netprio_cgroup.o
>   CC      net/core/netprio_cgroup.o
> net/core/netprio_cgroup.c:31:29: error: static declaration of ‘net_prio_subsys’ follows non-static declaration
> include/linux/cgroup_subsys.h:71:1: note: previous declaration of ‘net_prio_subsys’ was here
> make[1]: *** [net/core/netprio_cgroup.o] Error 1
> make: *** [net/core/netprio_cgroup.o] Error 2
> 
> 
> 

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

* Re: [net-next PATCH] net: netprio_cgroup: make net_prio_subsys static
  2011-12-09 16:31       ` John Fastabend
@ 2011-12-09 16:40         ` Neil Horman
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Horman @ 2011-12-09 16:40 UTC (permalink / raw)
  To: John Fastabend; +Cc: Eric Dumazet, David Miller, netdev@vger.kernel.org

On Fri, Dec 09, 2011 at 08:31:59AM -0800, John Fastabend wrote:
> On 12/9/2011 8:05 AM, Eric Dumazet wrote:
> > Le jeudi 08 décembre 2011 à 19:53 -0500, David Miller a écrit :
> >> From: Neil Horman <nhorman@tuxdriver.com>
> >> Date: Thu, 8 Dec 2011 06:45:55 -0500
> >>
> >>> On Wed, Dec 07, 2011 at 09:17:17PM -0800, John Fastabend wrote:
> >>>> net_prio_subsys can be made static this removes the sparse
> >>>> warning it was throwing.
> >>>>
> >>>> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> >>  ...
> >>> Acked-by: Neil Horman <nhorman@tuxdriver.com>
> >>
> >> Applied.
> >> --
> > 
> > But it trivialy breaks the build ? Or am I mistaken ?
> > 
> 
> Dang. No your right. When its not built as a module it breaks. Sorry
> I'll revert it.
> 
Yeah, I'd say revert it for now, but I think the real problem is that the SUBSYS
macro in the cgroup core code automatically defines a subsys structure as
extern.  We should look into fixing that properly instead long term.

> > 
> > $ grep CONFIG_NETPRIO_CGROUP .config
> > CONFIG_NETPRIO_CGROUP=y
> > 
> > $ make net/core/netprio_cgroup.o
> >   CC      net/core/netprio_cgroup.o
> > net/core/netprio_cgroup.c:31:29: error: static declaration of ‘net_prio_subsys’ follows non-static declaration
> > include/linux/cgroup_subsys.h:71:1: note: previous declaration of ‘net_prio_subsys’ was here
> > make[1]: *** [net/core/netprio_cgroup.o] Error 1
> > make: *** [net/core/netprio_cgroup.o] Error 2
> > 
> > 
> > 
> 
> 

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

end of thread, other threads:[~2011-12-09 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08  5:17 [net-next PATCH] net: netprio_cgroup: make net_prio_subsys static John Fastabend
2011-12-08 11:45 ` Neil Horman
2011-12-09  0:53   ` David Miller
2011-12-09 16:05     ` Eric Dumazet
2011-12-09 16:31       ` John Fastabend
2011-12-09 16:40         ` Neil Horman

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