memcg: fix compile warning on non-numa systems
Subsystems (3)
PATCH 1/1 memcg: fix compile warning on non-numa systems
Fix this warning:
CC mm/memcontrol.omm/memcontrol.c: In function 'memcg_check_events':mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
--- mm/memcontrol.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
mm/memcontrol.c +6 -4
@@ -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);
Signature · 8 lines
1.7.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. 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:"[email protected]"> [email protected] </a>
Quoted 5 lines · Li Zefan
Fix this warning:
CC
mm/memcontrol.omm/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.
Quoted 40 lines
Signed-off-by Li Zefan <[email protected]>--- mm/memcontrol.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)mm/memcontrol.c +6
-4@@ -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);Signature · 8 lines
1.7.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected] 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:"[email protected]"> [email protected] </a>
Signature · 6 lines
Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic
Andrew Morton
maintainerQuoted 7 lines · On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <[email protected]> wrote:
Quoted 5 lines · Li Zefan
Fix this warning:
CC
mm/memcontrol.omm/memcontrol.c: In function 'memcg_check_events':mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
Quoted 5 lines
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?
mm/memcontrol.c renamed from mm/memcontrol.c~a +2 -1
@@ -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 [email protected]. 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:"[email protected]"> [email protected] </a>
Kirill A. Shutemov
Acked-byQuoted 29 lines · Andrew Morton
Quoted 7 lines · On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <[email protected]> wrote:
Quoted 5 lines · Li Zefan
Fix this warning:
CC
mm/memcontrol.omm/memcontrol.c: In function 'memcg_check_events':mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'Quoted 5 lines
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?
mm/memcontrol.c renamed from mm/memcontrol.c~a +2
-1@@ -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 );
Quoted 1 line
_
Signature · 8 lines
Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. 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:"[email protected]"> [email protected] </a>
Michal Hocko
Acked-byQuoted 9 lines · Andrew Morton
Quoted 7 lines · On Mon, 16 Jan 2012 09:47:15 +0100 Michal Hocko <[email protected]> wrote:
Quoted 5 lines · Li Zefan
Fix this warning:
CC
mm/memcontrol.omm/memcontrol.c: In function 'memcg_check_events':mm/memcontrol.c:779:22: warning: unused variable 'do_numainfo'
Quoted 7 lines
Quoted 5 lines
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.
Quoted 15 lines
mm/memcontrol.c renamed from mm/memcontrol.c~a +2
-1@@ -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 );_
Signature · 6 lines
Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic