All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-16  6:04 ` Li Zefan
  0 siblings, 0 replies; 13+ messages in thread
From: Li Zefan @ 2012-01-16  6:04 UTC (permalink / raw)
  To: linux-mm
  Cc: Michal Hocko, bsingharora, Hiroyuki KAMEZAWA, Johannes Weiner,
	linux-mm, Cgroups, LKML

Fix this warning:

  CC      mm/memcontrol.o
mm/memcontrol.c: In function 'memcg_check_events':
mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 mm/memcontrol.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 602207b..c8aeab8 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -776,14 +776,16 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
 	/* threshold event is triggered in finer grain than soft limit */
 	if (unlikely(mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_THRESH))) {
-		bool do_softlimit, do_numainfo;
-
-		do_softlimit = mem_cgroup_event_ratelimit(memcg,
-						MEM_CGROUP_TARGET_SOFTLIMIT);
+		bool do_softlimit;
 #if MAX_NUMNODES > 1
+		bool do_numainfo;
+
 		do_numainfo = mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_NUMAINFO);
 #endif
+
+		do_softlimit = mem_cgroup_event_ratelimit(memcg,
+						MEM_CGROUP_TARGET_SOFTLIMIT);
 		preempt_enable();
 
 		mem_cgroup_threshold(memcg);
-- 
1.7.3.1

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

* [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-16  6:04 ` Li Zefan
  0 siblings, 0 replies; 13+ messages in thread
From: Li Zefan @ 2012-01-16  6:04 UTC (permalink / raw)
  To: linux-mm
  Cc: Michal Hocko, bsingharora, Hiroyuki KAMEZAWA, Johannes Weiner,
	Cgroups, LKML

Fix this warning:

  CC      mm/memcontrol.o
mm/memcontrol.c: In function 'memcg_check_events':
mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 mm/memcontrol.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 602207b..c8aeab8 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -776,14 +776,16 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
 	/* threshold event is triggered in finer grain than soft limit */
 	if (unlikely(mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_THRESH))) {
-		bool do_softlimit, do_numainfo;
-
-		do_softlimit = mem_cgroup_event_ratelimit(memcg,
-						MEM_CGROUP_TARGET_SOFTLIMIT);
+		bool do_softlimit;
 #if MAX_NUMNODES > 1
+		bool do_numainfo;
+
 		do_numainfo = mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_NUMAINFO);
 #endif
+
+		do_softlimit = mem_cgroup_event_ratelimit(memcg,
+						MEM_CGROUP_TARGET_SOFTLIMIT);
 		preempt_enable();
 
 		mem_cgroup_threshold(memcg);
-- 
1.7.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-16  6:04 ` Li Zefan
  0 siblings, 0 replies; 13+ messages in thread
From: Li Zefan @ 2012-01-16  6:04 UTC (permalink / raw)
  Cc: Michal Hocko, bsingharora, Hiroyuki KAMEZAWA, Johannes Weiner,
	linux-mm, Cgroups, LKML

Fix this warning:

  CC      mm/memcontrol.o
mm/memcontrol.c: In function 'memcg_check_events':
mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 mm/memcontrol.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 602207b..c8aeab8 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -776,14 +776,16 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
 	/* threshold event is triggered in finer grain than soft limit */
 	if (unlikely(mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_THRESH))) {
-		bool do_softlimit, do_numainfo;
-
-		do_softlimit = mem_cgroup_event_ratelimit(memcg,
-						MEM_CGROUP_TARGET_SOFTLIMIT);
+		bool do_softlimit;
 #if MAX_NUMNODES > 1
+		bool do_numainfo;
+
 		do_numainfo = mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_NUMAINFO);
 #endif
+
+		do_softlimit = mem_cgroup_event_ratelimit(memcg,
+						MEM_CGROUP_TARGET_SOFTLIMIT);
 		preempt_enable();
 
 		mem_cgroup_threshold(memcg);
-- 
1.7.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
  2012-01-16  6:04 ` Li Zefan
  (?)
@ 2012-01-16  8:47   ` Michal Hocko
  -1 siblings, 0 replies; 13+ messages in thread
From: Michal Hocko @ 2012-01-16  8:47 UTC (permalink / raw)
  To: Li Zefan
  Cc: linux-mm, bsingharora, Hiroyuki KAMEZAWA, Johannes Weiner,
	Cgroups, LKML, Kirill A. Shutemov

On Mon 16-01-12 14:04:53, Li Zefan wrote:
> Fix this warning:
> 
>   CC      mm/memcontrol.o
> mm/memcontrol.c: In function 'memcg_check_events':
> mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'

This has been already posted by Kirill and I didn't like the solution
(https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
version (https://lkml.org/lkml/2012/1/6/281).
The later one looks better but I still think this is not worth
complicate the code just to get rid of this warning.

> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
>  mm/memcontrol.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 602207b..c8aeab8 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -776,14 +776,16 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
>  	/* threshold event is triggered in finer grain than soft limit */
>  	if (unlikely(mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_THRESH))) {
> -		bool do_softlimit, do_numainfo;
> -
> -		do_softlimit = mem_cgroup_event_ratelimit(memcg,
> -						MEM_CGROUP_TARGET_SOFTLIMIT);
> +		bool do_softlimit;
>  #if MAX_NUMNODES > 1
> +		bool do_numainfo;
> +
>  		do_numainfo = mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_NUMAINFO);
>  #endif
> +
> +		do_softlimit = mem_cgroup_event_ratelimit(memcg,
> +						MEM_CGROUP_TARGET_SOFTLIMIT);
>  		preempt_enable();
>  
>  		mem_cgroup_threshold(memcg);
> -- 
> 1.7.3.1
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-16  8:47   ` Michal Hocko
  0 siblings, 0 replies; 13+ messages in thread
From: Michal Hocko @ 2012-01-16  8:47 UTC (permalink / raw)
  To: Li Zefan
  Cc: linux-mm, bsingharora, Hiroyuki KAMEZAWA, Johannes Weiner,
	Cgroups, LKML, Kirill A. Shutemov

On Mon 16-01-12 14:04:53, Li Zefan wrote:
> Fix this warning:
> 
>   CC      mm/memcontrol.o
> mm/memcontrol.c: In function 'memcg_check_events':
> mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'

This has been already posted by Kirill and I didn't like the solution
(https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
version (https://lkml.org/lkml/2012/1/6/281).
The later one looks better but I still think this is not worth
complicate the code just to get rid of this warning.

> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
>  mm/memcontrol.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 602207b..c8aeab8 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -776,14 +776,16 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
>  	/* threshold event is triggered in finer grain than soft limit */
>  	if (unlikely(mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_THRESH))) {
> -		bool do_softlimit, do_numainfo;
> -
> -		do_softlimit = mem_cgroup_event_ratelimit(memcg,
> -						MEM_CGROUP_TARGET_SOFTLIMIT);
> +		bool do_softlimit;
>  #if MAX_NUMNODES > 1
> +		bool do_numainfo;
> +
>  		do_numainfo = mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_NUMAINFO);
>  #endif
> +
> +		do_softlimit = mem_cgroup_event_ratelimit(memcg,
> +						MEM_CGROUP_TARGET_SOFTLIMIT);
>  		preempt_enable();
>  
>  		mem_cgroup_threshold(memcg);
> -- 
> 1.7.3.1
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-16  8:47   ` Michal Hocko
  0 siblings, 0 replies; 13+ messages in thread
From: Michal Hocko @ 2012-01-16  8:47 UTC (permalink / raw)
  To: Li Zefan
  Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	bsingharora-Re5JQEeQqe8AvxtiuMwx3w, Hiroyuki KAMEZAWA,
	Johannes Weiner, Cgroups, LKML, Kirill A. Shutemov

On Mon 16-01-12 14:04:53, Li Zefan wrote:
> Fix this warning:
> 
>   CC      mm/memcontrol.o
> mm/memcontrol.c: In function 'memcg_check_events':
> mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'

This has been already posted by Kirill and I didn't like the solution
(https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
version (https://lkml.org/lkml/2012/1/6/281).
The later one looks better but I still think this is not worth
complicate the code just to get rid of this warning.

> 
> Signed-off-by: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
> ---
>  mm/memcontrol.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 602207b..c8aeab8 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -776,14 +776,16 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
>  	/* threshold event is triggered in finer grain than soft limit */
>  	if (unlikely(mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_THRESH))) {
> -		bool do_softlimit, do_numainfo;
> -
> -		do_softlimit = mem_cgroup_event_ratelimit(memcg,
> -						MEM_CGROUP_TARGET_SOFTLIMIT);
> +		bool do_softlimit;
>  #if MAX_NUMNODES > 1
> +		bool do_numainfo;
> +
>  		do_numainfo = mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_NUMAINFO);
>  #endif
> +
> +		do_softlimit = mem_cgroup_event_ratelimit(memcg,
> +						MEM_CGROUP_TARGET_SOFTLIMIT);
>  		preempt_enable();
>  
>  		mem_cgroup_threshold(memcg);
> -- 
> 1.7.3.1
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo-Bw31MaZKKs0EbZ0PF+XxCw@public.gmane.org  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org"> email-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org </a>

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
  2012-01-26  8:55     ` Andrew Morton
@ 2012-01-26  8:54       ` Kirill A. Shutemov
  -1 siblings, 0 replies; 13+ messages in thread
From: Kirill A. Shutemov @ 2012-01-26  8:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, Li Zefan, linux-mm, bsingharora, Hiroyuki KAMEZAWA,
	Johannes Weiner, Cgroups, LKML

On Thu, Jan 26, 2012 at 12:55:21AM -0800, Andrew Morton wrote:
> On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <mhocko@suse.cz> wrote:
> 
> > On Mon 16-01-12 14:04:53, Li Zefan wrote:
> > > Fix this warning:
> > > 
> > >   CC      mm/memcontrol.o
> > > mm/memcontrol.c: In function 'memcg_check_events':
> > > mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
> > 
> > This has been already posted by Kirill and I didn't like the solution
> > (https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
> > version (https://lkml.org/lkml/2012/1/6/281).
> > The later one looks better but I still think this is not worth
> > complicate the code just to get rid of this warning.
> 
> This?
> 
> --- a/mm/memcontrol.c~a
> +++ a/mm/memcontrol.c
> @@ -776,7 +776,8 @@ static void memcg_check_events(struct me
>  	/* threshold event is triggered in finer grain than soft limit */
>  	if (unlikely(mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_THRESH))) {
> -		bool do_softlimit, do_numainfo;
> +		bool do_softlimit;
> +		bool do_numainfo __maybe_unused;
>  
>  		do_softlimit = mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_SOFTLIMIT);
> _

Acked-by: Kirill A. Shutemov <kirill@shutemov.name>

-- 
 Kirill A. Shutemov

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-26  8:54       ` Kirill A. Shutemov
  0 siblings, 0 replies; 13+ messages in thread
From: Kirill A. Shutemov @ 2012-01-26  8:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, Li Zefan, linux-mm, bsingharora, Hiroyuki KAMEZAWA,
	Johannes Weiner, Cgroups, LKML

On Thu, Jan 26, 2012 at 12:55:21AM -0800, Andrew Morton wrote:
> On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <mhocko@suse.cz> wrote:
> 
> > On Mon 16-01-12 14:04:53, Li Zefan wrote:
> > > Fix this warning:
> > > 
> > >   CC      mm/memcontrol.o
> > > mm/memcontrol.c: In function 'memcg_check_events':
> > > mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
> > 
> > This has been already posted by Kirill and I didn't like the solution
> > (https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
> > version (https://lkml.org/lkml/2012/1/6/281).
> > The later one looks better but I still think this is not worth
> > complicate the code just to get rid of this warning.
> 
> This?
> 
> --- a/mm/memcontrol.c~a
> +++ a/mm/memcontrol.c
> @@ -776,7 +776,8 @@ static void memcg_check_events(struct me
>  	/* threshold event is triggered in finer grain than soft limit */
>  	if (unlikely(mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_THRESH))) {
> -		bool do_softlimit, do_numainfo;
> +		bool do_softlimit;
> +		bool do_numainfo __maybe_unused;
>  
>  		do_softlimit = mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_SOFTLIMIT);
> _

Acked-by: Kirill A. Shutemov <kirill@shutemov.name>

-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
  2012-01-16  8:47   ` Michal Hocko
  (?)
@ 2012-01-26  8:55     ` Andrew Morton
  -1 siblings, 0 replies; 13+ messages in thread
From: Andrew Morton @ 2012-01-26  8:55 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Li Zefan, linux-mm, bsingharora, Hiroyuki KAMEZAWA,
	Johannes Weiner, Cgroups, LKML, Kirill A. Shutemov

On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <mhocko@suse.cz> wrote:

> On Mon 16-01-12 14:04:53, Li Zefan wrote:
> > Fix this warning:
> > 
> >   CC      mm/memcontrol.o
> > mm/memcontrol.c: In function 'memcg_check_events':
> > mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
> 
> This has been already posted by Kirill and I didn't like the solution
> (https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
> version (https://lkml.org/lkml/2012/1/6/281).
> The later one looks better but I still think this is not worth
> complicate the code just to get rid of this warning.

This?

--- a/mm/memcontrol.c~a
+++ a/mm/memcontrol.c
@@ -776,7 +776,8 @@ static void memcg_check_events(struct me
 	/* threshold event is triggered in finer grain than soft limit */
 	if (unlikely(mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_THRESH))) {
-		bool do_softlimit, do_numainfo;
+		bool do_softlimit;
+		bool do_numainfo __maybe_unused;
 
 		do_softlimit = mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_SOFTLIMIT);
_


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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-26  8:55     ` Andrew Morton
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Morton @ 2012-01-26  8:55 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Li Zefan, linux-mm, bsingharora, Hiroyuki KAMEZAWA,
	Johannes Weiner, Cgroups, LKML, Kirill A. Shutemov

On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <mhocko@suse.cz> wrote:

> On Mon 16-01-12 14:04:53, Li Zefan wrote:
> > Fix this warning:
> > 
> >   CC      mm/memcontrol.o
> > mm/memcontrol.c: In function 'memcg_check_events':
> > mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
> 
> This has been already posted by Kirill and I didn't like the solution
> (https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
> version (https://lkml.org/lkml/2012/1/6/281).
> The later one looks better but I still think this is not worth
> complicate the code just to get rid of this warning.

This?

--- a/mm/memcontrol.c~a
+++ a/mm/memcontrol.c
@@ -776,7 +776,8 @@ static void memcg_check_events(struct me
 	/* threshold event is triggered in finer grain than soft limit */
 	if (unlikely(mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_THRESH))) {
-		bool do_softlimit, do_numainfo;
+		bool do_softlimit;
+		bool do_numainfo __maybe_unused;
 
 		do_softlimit = mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_SOFTLIMIT);
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-26  8:55     ` Andrew Morton
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Morton @ 2012-01-26  8:55 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Li Zefan, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	bsingharora-Re5JQEeQqe8AvxtiuMwx3w, Hiroyuki KAMEZAWA,
	Johannes Weiner, Cgroups, LKML, Kirill A. Shutemov

On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org> wrote:

> On Mon 16-01-12 14:04:53, Li Zefan wrote:
> > Fix this warning:
> > 
> >   CC      mm/memcontrol.o
> > mm/memcontrol.c: In function 'memcg_check_events':
> > mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
> 
> This has been already posted by Kirill and I didn't like the solution
> (https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
> version (https://lkml.org/lkml/2012/1/6/281).
> The later one looks better but I still think this is not worth
> complicate the code just to get rid of this warning.

This?

--- a/mm/memcontrol.c~a
+++ a/mm/memcontrol.c
@@ -776,7 +776,8 @@ static void memcg_check_events(struct me
 	/* threshold event is triggered in finer grain than soft limit */
 	if (unlikely(mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_THRESH))) {
-		bool do_softlimit, do_numainfo;
+		bool do_softlimit;
+		bool do_numainfo __maybe_unused;
 
 		do_softlimit = mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_SOFTLIMIT);
_

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
  2012-01-26  8:55     ` Andrew Morton
@ 2012-01-26  9:01       ` Michal Hocko
  -1 siblings, 0 replies; 13+ messages in thread
From: Michal Hocko @ 2012-01-26  9:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Li Zefan, linux-mm, bsingharora, Hiroyuki KAMEZAWA,
	Johannes Weiner, Cgroups, LKML, Kirill A. Shutemov

On Thu 26-01-12 00:55:21, Andrew Morton wrote:
> On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <mhocko@suse.cz> wrote:
> 
> > On Mon 16-01-12 14:04:53, Li Zefan wrote:
> > > Fix this warning:
> > > 
> > >   CC      mm/memcontrol.o
> > > mm/memcontrol.c: In function 'memcg_check_events':
> > > mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
> > 
> > This has been already posted by Kirill and I didn't like the solution
> > (https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
> > version (https://lkml.org/lkml/2012/1/6/281).
> > The later one looks better but I still think this is not worth
> > complicate the code just to get rid of this warning.
> 
> This?

Haven't seen this one but it looks sane.
Acked-by: Michal Hocko <mhocko@suse.cz>

> 
> --- a/mm/memcontrol.c~a
> +++ a/mm/memcontrol.c
> @@ -776,7 +776,8 @@ static void memcg_check_events(struct me
>  	/* threshold event is triggered in finer grain than soft limit */
>  	if (unlikely(mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_THRESH))) {
> -		bool do_softlimit, do_numainfo;
> +		bool do_softlimit;
> +		bool do_numainfo __maybe_unused;
>  
>  		do_softlimit = mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_SOFTLIMIT);
> _
> 

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

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

* Re: [PATCH] memcg: fix compile warning on non-numa systems
@ 2012-01-26  9:01       ` Michal Hocko
  0 siblings, 0 replies; 13+ messages in thread
From: Michal Hocko @ 2012-01-26  9:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Li Zefan, linux-mm, bsingharora, Hiroyuki KAMEZAWA,
	Johannes Weiner, Cgroups, LKML, Kirill A. Shutemov

On Thu 26-01-12 00:55:21, Andrew Morton wrote:
> On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <mhocko@suse.cz> wrote:
> 
> > On Mon 16-01-12 14:04:53, Li Zefan wrote:
> > > Fix this warning:
> > > 
> > >   CC      mm/memcontrol.o
> > > mm/memcontrol.c: In function 'memcg_check_events':
> > > mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
> > 
> > This has been already posted by Kirill and I didn't like the solution
> > (https://lkml.org/lkml/2011/12/27/86). He then reposted with a different
> > version (https://lkml.org/lkml/2012/1/6/281).
> > The later one looks better but I still think this is not worth
> > complicate the code just to get rid of this warning.
> 
> This?

Haven't seen this one but it looks sane.
Acked-by: Michal Hocko <mhocko@suse.cz>

> 
> --- a/mm/memcontrol.c~a
> +++ a/mm/memcontrol.c
> @@ -776,7 +776,8 @@ static void memcg_check_events(struct me
>  	/* threshold event is triggered in finer grain than soft limit */
>  	if (unlikely(mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_THRESH))) {
> -		bool do_softlimit, do_numainfo;
> +		bool do_softlimit;
> +		bool do_numainfo __maybe_unused;
>  
>  		do_softlimit = mem_cgroup_event_ratelimit(memcg,
>  						MEM_CGROUP_TARGET_SOFTLIMIT);
> _
> 

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2012-01-26  9:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-16  6:04 [PATCH] memcg: fix compile warning on non-numa systems Li Zefan
2012-01-16  6:04 ` Li Zefan
2012-01-16  6:04 ` Li Zefan
2012-01-16  8:47 ` Michal Hocko
2012-01-16  8:47   ` Michal Hocko
2012-01-16  8:47   ` Michal Hocko
2012-01-26  8:55   ` Andrew Morton
2012-01-26  8:55     ` Andrew Morton
2012-01-26  8:55     ` Andrew Morton
2012-01-26  8:54     ` Kirill A. Shutemov
2012-01-26  8:54       ` Kirill A. Shutemov
2012-01-26  9:01     ` Michal Hocko
2012-01-26  9:01       ` Michal Hocko

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.