All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: bharata@in.ibm.com
Cc: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: [-mm patch] make the dummy kmem_set_shrinker() a static inline
Date: Fri, 17 Mar 2006 21:19:48 +0100	[thread overview]
Message-ID: <20060317201948.GX3914@stusta.de> (raw)

In the CONFIG_SLAB=n case we want to save space - so let's save a few 
more bytes.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 include/linux/slab.h |    7 +++++++
 mm/slob.c            |    5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

--- linux-2.6.16-rc6-mm1-full/include/linux/slab.h.old	2006-03-17 13:39:18.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/linux/slab.h	2006-03-17 15:48:53.000000000 +0100
@@ -144,6 +144,9 @@
 extern int FASTCALL(kmem_cache_reap(int));
 extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
 
+struct shrinker;
+extern void kmem_set_shrinker(kmem_cache_t *cachep, struct shrinker *shrinker);
+
 #else /* CONFIG_SLOB */
 
 /* SLOB allocator routines */
@@ -176,6 +179,10 @@
 #define kmalloc_node(s, f, n) kmalloc(s, f)
 #define ____kmalloc kmalloc
 
+struct shrinker;
+static inline void kmem_set_shrinker(kmem_cache_t *cachep,
+				     struct shrinker *shrinker) {}
+
 #endif /* CONFIG_SLOB */
 
 /* System wide caches */
--- linux-2.6.16-rc6-mm1-full/mm/slob.c.old	2006-03-17 13:40:54.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/mm/slob.c	2006-03-17 13:41:01.000000000 +0100
@@ -240,11 +240,6 @@
 	return ((slob_t *)block - 1)->units * SLOB_UNIT;
 }
 
-void kmem_set_shrinker(kmem_cache_t *cachep, struct shrinker *shrinker)
-{
-}
-EXPORT_SYMBOL(kmem_set_shrinker);
-
 struct kmem_cache {
 	unsigned int size, align;
 	const char *name;


                 reply	other threads:[~2006-03-17 20:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060317201948.GX3914@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=bharata@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuasa@hh.iij4u.or.jp \
    /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 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.