From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Matt Mackall <mpm@selenic.com>,
Christoph Lameter <cl@linux-foundation.org>
Subject: [PATCH] slab: remove duplicate kmem_cache_init_late() declarations
Date: Thu, 6 Aug 2009 13:31:53 +0800 [thread overview]
Message-ID: <20090806053153.GA13960@localhost> (raw)
In-Reply-To: <20090805211727.cd4ccedd.akpm@linux-foundation.org>
On Thu, Aug 06, 2009 at 12:17:27PM +0800, Andrew Morton wrote:
> On Thu, 6 Aug 2009 10:27:04 +0800 Wu Fengguang <fengguang.wu@intel.com> wrote:
>
> > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> > ---
> > include/linux/slqb_def.h | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > --- linux-mm.orig/include/linux/slqb_def.h 2009-07-20 20:10:20.000000000 +0800
> > +++ linux-mm/include/linux/slqb_def.h 2009-08-06 10:17:05.000000000 +0800
> > @@ -298,4 +298,6 @@ static __always_inline void *kmalloc_nod
> > }
> > #endif
> >
> > +void __init kmem_cache_init_late(void);
> > +
> > #endif /* _LINUX_SLQB_DEF_H */
>
> spose so.
>
> As all sl[a-zA-Z_]b.c must implement this, why not put the declaration
> into slab.h?
>
> That would require uninlining the slob one, but it's tiny and __init.
Right. It seems someone recently moved the declaration from slab_def.h
to slab.h, so the replacement patch is a bit smaller:
---
slab: remove duplicate kmem_cache_init_late() declarations
kmem_cache_init_late() has been declared in slab.h
CC: Nick Piggin <npiggin@suse.de>
CC: Matt Mackall <mpm@selenic.com>
CC: Pekka Enberg <penberg@cs.helsinki.fi>
CC: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
include/linux/slob_def.h | 5 -----
include/linux/slub_def.h | 2 --
mm/slob.c | 5 +++++
3 files changed, 5 insertions(+), 7 deletions(-)
--- linux-mm.orig/include/linux/slub_def.h 2009-08-06 13:15:24.000000000 +0800
+++ linux-mm/include/linux/slub_def.h 2009-08-06 13:15:52.000000000 +0800
@@ -304,6 +304,4 @@ static __always_inline void *kmalloc_nod
}
#endif
-void __init kmem_cache_init_late(void);
-
#endif /* _LINUX_SLUB_DEF_H */
--- linux-mm.orig/include/linux/slob_def.h 2009-08-06 13:15:24.000000000 +0800
+++ linux-mm/include/linux/slob_def.h 2009-08-06 13:15:52.000000000 +0800
@@ -34,9 +34,4 @@ static __always_inline void *__kmalloc(s
return kmalloc(size, flags);
}
-static inline void kmem_cache_init_late(void)
-{
- /* Nothing to do */
-}
-
#endif /* __LINUX_SLOB_DEF_H */
--- linux-mm.orig/mm/slob.c 2009-08-06 13:15:24.000000000 +0800
+++ linux-mm/mm/slob.c 2009-08-06 13:23:50.000000000 +0800
@@ -692,3 +692,8 @@ void __init kmem_cache_init(void)
{
slob_ready = 1;
}
+
+void __init kmem_cache_init_late(void)
+{
+ /* Nothing to do */
+}
--
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>
next prev parent reply other threads:[~2009-08-06 5:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 2:27 [PATCH] slqb: add declaration for kmem_cache_init_late() Wu Fengguang
2009-08-06 4:17 ` Andrew Morton
2009-08-06 5:31 ` Wu Fengguang [this message]
2009-08-06 9:02 ` [PATCH] slab: remove duplicate kmem_cache_init_late() declarations Pekka Enberg
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=20090806053153.GA13960@localhost \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=npiggin@suse.de \
--cc=penberg@cs.helsinki.fi \
/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