From: David Rientjes <rientjes@google.com>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org
Subject: Re: [patch -mm 6/5] memcontrol: move mm_cgroup to header file
Date: Tue, 25 Sep 2007 11:49:14 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.0.9999.0709251145270.19001@chino.kir.corp.google.com> (raw)
In-Reply-To: <46F942D6.3020103@linux.vnet.ibm.com>
On Tue, 25 Sep 2007, Balbir Singh wrote:
> > Inline functions must preceed their use, so mm_cgroup() should be defined
> > in linux/memcontrol.h.
> >
> > include/linux/memcontrol.h:48: warning: 'mm_cgroup' declared inline after
> > being called
> > include/linux/memcontrol.h:48: warning: previous declaration of
> > 'mm_cgroup' was here
> >
> > Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> > Signed-off-by: David Rientjes <rientjes@google.com>
>
> Is this a new warning or have you seen this earlier. I don't see the
> warning in any of the versions upto 2.6.23-rc7-mm1. I'll check
> the compilation output again and of-course 2.6.23-rc8-mm1
>
It was produced when I implemented the filtering for the task dump with
respect to cgroups, that's why this fix is included in a series that
applies to the OOM killer.
Inline functions always need to preceed their use, otherwise the compiler
can't inline them and they become normal functions. So the quick rule is
that inline functions are always "static inline," which this one was not.
Those functions are always available in only one source file or declared
in a header (and usually included before source file code) so that you
don't need to worry about the declaration and use ordering.
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-09-25 18:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-25 17:13 David Rientjes
2007-09-25 17:13 ` [patch -mm 7/5] oom: filter tasklist dump by mem_cgroup David Rientjes
2007-09-25 17:48 ` Balbir Singh
2007-09-25 19:18 ` David Rientjes
2007-09-25 18:00 ` Paul Menage
2007-09-25 21:17 ` Christoph Lameter
2007-09-25 22:54 ` Paul Menage
2007-09-26 1:14 ` Paul Jackson
2007-09-26 1:20 ` David Rientjes
2007-09-26 3:56 ` Paul Jackson
2007-09-26 4:14 ` David Rientjes
2007-09-26 4:24 ` David Rientjes
2007-09-26 4:37 ` Paul Jackson
2007-09-26 1:22 ` Paul Menage
2007-09-26 3:57 ` Paul Jackson
2007-09-26 4:03 ` Paul Menage
2007-09-26 4:30 ` Paul Jackson
2007-09-25 17:18 ` [patch -mm 6/5] memcontrol: move mm_cgroup to header file Balbir Singh
2007-09-25 18:49 ` David Rientjes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.0.9999.0709251145270.19001@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox