All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Dobson <colpatch@us.ibm.com>
To: kernel-janitors@lists.osdl.org
Cc: Pekka J Enberg <penberg@cs.Helsinki.FI>, linux-kernel@vger.kernel.org
Subject: [KJ] [PATCH 8/8] Inline 3 functions
Date: Tue, 08 Nov 2005 01:00:04 +0000	[thread overview]
Message-ID: <436FF894.8090204@us.ibm.com> (raw)
In-Reply-To: <436FF51D.8080509@us.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

I found three functions in slab.c that have only 1 caller (kmem_getpages,
alloc_slabmgmt, and set_slab_attr), so let's inline them.

mcd@arrakis:~/linux/source/linux-2.6.14+slab_cleanup/patches $ diffstat
inline_functions.patch
 slab.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

-Matt

[-- Attachment #2: inline_functions.patch --]
[-- Type: text/x-patch, Size: 1355 bytes --]

Inline 3 functions that have only one caller.

Index: linux-2.6.14+slab_cleanup/mm/slab.c
===================================================================
--- linux-2.6.14+slab_cleanup.orig/mm/slab.c	2005-11-07 16:07:59.169063888 -0800
+++ linux-2.6.14+slab_cleanup/mm/slab.c	2005-11-07 16:10:24.981896968 -0800
@@ -1183,7 +1183,7 @@ __initcall(cpucache_init);
  * did not request dmaable memory, we might get it, but that
  * would be relatively rare and ignorable.
  */
-static void *kmem_getpages(kmem_cache_t *cachep, gfp_t flags, int nid)
+static inline void *kmem_getpages(kmem_cache_t *cachep, gfp_t flags, int nid)
 {
 	struct page *page;
 	void *addr;
@@ -2048,8 +2048,8 @@ int kmem_cache_destroy(kmem_cache_t *cac
 EXPORT_SYMBOL(kmem_cache_destroy);
 
 /* Get the memory for a slab management obj. */
-static struct slab *alloc_slabmgmt(kmem_cache_t *cachep, void *objp,
-				   int colour_off, gfp_t local_flags)
+static inline struct slab *alloc_slabmgmt(kmem_cache_t *cachep, void *objp,
+					  int colour_off, gfp_t local_flags)
 {
 	struct slab *slabp;
 	
@@ -2134,7 +2134,8 @@ static void kmem_flagcheck(kmem_cache_t 
 	}
 }
 
-static void set_slab_attr(kmem_cache_t *cachep, struct slab *slabp, void *objp)
+static inline void set_slab_attr(kmem_cache_t *cachep, struct slab *slabp,
+				 void *objp)
 {
 	int i;
 	struct page *page;

[-- Attachment #3: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

WARNING: multiple messages have this Message-ID (diff)
From: Matthew Dobson <colpatch@us.ibm.com>
To: kernel-janitors@lists.osdl.org
Cc: Pekka J Enberg <penberg@cs.Helsinki.FI>, linux-kernel@vger.kernel.org
Subject: [PATCH 8/8] Inline 3 functions
Date: Mon, 07 Nov 2005 17:00:04 -0800	[thread overview]
Message-ID: <436FF894.8090204@us.ibm.com> (raw)
In-Reply-To: <436FF51D.8080509@us.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

I found three functions in slab.c that have only 1 caller (kmem_getpages,
alloc_slabmgmt, and set_slab_attr), so let's inline them.

mcd@arrakis:~/linux/source/linux-2.6.14+slab_cleanup/patches $ diffstat
inline_functions.patch
 slab.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

-Matt

[-- Attachment #2: inline_functions.patch --]
[-- Type: text/x-patch, Size: 1355 bytes --]

Inline 3 functions that have only one caller.

Index: linux-2.6.14+slab_cleanup/mm/slab.c
===================================================================
--- linux-2.6.14+slab_cleanup.orig/mm/slab.c	2005-11-07 16:07:59.169063888 -0800
+++ linux-2.6.14+slab_cleanup/mm/slab.c	2005-11-07 16:10:24.981896968 -0800
@@ -1183,7 +1183,7 @@ __initcall(cpucache_init);
  * did not request dmaable memory, we might get it, but that
  * would be relatively rare and ignorable.
  */
-static void *kmem_getpages(kmem_cache_t *cachep, gfp_t flags, int nid)
+static inline void *kmem_getpages(kmem_cache_t *cachep, gfp_t flags, int nid)
 {
 	struct page *page;
 	void *addr;
@@ -2048,8 +2048,8 @@ int kmem_cache_destroy(kmem_cache_t *cac
 EXPORT_SYMBOL(kmem_cache_destroy);
 
 /* Get the memory for a slab management obj. */
-static struct slab *alloc_slabmgmt(kmem_cache_t *cachep, void *objp,
-				   int colour_off, gfp_t local_flags)
+static inline struct slab *alloc_slabmgmt(kmem_cache_t *cachep, void *objp,
+					  int colour_off, gfp_t local_flags)
 {
 	struct slab *slabp;
 	
@@ -2134,7 +2134,8 @@ static void kmem_flagcheck(kmem_cache_t 
 	}
 }
 
-static void set_slab_attr(kmem_cache_t *cachep, struct slab *slabp, void *objp)
+static inline void set_slab_attr(kmem_cache_t *cachep, struct slab *slabp,
+				 void *objp)
 {
 	int i;
 	struct page *page;

  parent reply	other threads:[~2005-11-08  1:00 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08  0:45 [KJ] [PATCH 0/8] Cleanup slab.c Matthew Dobson
2005-11-08  0:45 ` Matthew Dobson
2005-11-08  0:48 ` [KJ] [PATCH 1/8] Apply CodingStyle to mm/slab.c Matthew Dobson
2005-11-08  0:48   ` Matthew Dobson
2005-11-08  0:50 ` [KJ] [PATCH 2/8] Use 'nid' in slab.c Matthew Dobson
2005-11-08  0:50   ` Matthew Dobson
2005-11-08  7:52   ` [KJ] " Pekka J Enberg
2005-11-08  7:52     ` Pekka J Enberg
2005-11-08  8:48     ` [KJ] " Håkon Løvdal
2005-11-08  0:52 ` [KJ] [PATCH 3/8] Fix alloc_percpu()'s args Matthew Dobson
2005-11-08  0:52   ` Matthew Dobson
2005-11-08  0:53 ` [KJ] [PATCH 4/8] Cleanup kmem_cache_create() Matthew Dobson
2005-11-08  0:53   ` Matthew Dobson
2005-11-08  2:14   ` [KJ] " Roland Dreier
2005-11-08  2:14     ` Roland Dreier
2005-11-08  7:34     ` [KJ] " Pekka J Enberg
2005-11-08  7:34       ` Pekka J Enberg
2005-11-08 18:49       ` [KJ] " Matthew Dobson
2005-11-08 18:49         ` Matthew Dobson
2005-11-08 18:52     ` [KJ] " Christoph Lameter
2005-11-08 18:52       ` Christoph Lameter
2005-11-08 19:04       ` [KJ] " Matthew Dobson
2005-11-08 19:04         ` Matthew Dobson
2005-11-08 19:09         ` [KJ] " Christoph Lameter
2005-11-08 19:09           ` Christoph Lameter
2005-11-08 19:21           ` [KJ] " Matthew Dobson
2005-11-08 19:21             ` Matthew Dobson
2005-11-08 19:59             ` [KJ] " Manfred Spraul
2005-11-08 19:59               ` Manfred Spraul
2005-11-08  7:51   ` [KJ] " Pekka J Enberg
2005-11-08  7:51     ` Pekka J Enberg
2005-11-08 18:54     ` [KJ] " Matthew Dobson
2005-11-08 18:54       ` Matthew Dobson
2005-11-08 15:00   ` [KJ] " Matthew Wilcox
2005-11-08 15:00     ` Matthew Wilcox
2005-11-08 15:11     ` Pekka J Enberg
2005-11-08 15:11       ` Pekka J Enberg
2005-11-08 19:10       ` Matthew Dobson
2005-11-08 19:10         ` Matthew Dobson
2005-11-08  0:55 ` [KJ] [PATCH 5/8] Cleanup cache_reap() Matthew Dobson
2005-11-08  0:55   ` Matthew Dobson
2005-11-08  0:57 ` [KJ] [PATCH 6/8] Cleanup slabinfo_write() Matthew Dobson
2005-11-08  0:57   ` Matthew Dobson
2005-11-08 10:50   ` [KJ] " Alexey Dobriyan
2005-11-08 10:50     ` Alexey Dobriyan
2005-11-08 18:56     ` Christoph Lameter
2005-11-08 18:56       ` Christoph Lameter
2005-11-08 19:09       ` Matthew Dobson
2005-11-08 19:09         ` Matthew Dobson
2005-11-08  0:58 ` [KJ] [PATCH 7/8] Cleanup set_slab_attr() Matthew Dobson
2005-11-08  0:58   ` Matthew Dobson
2005-11-08  9:43   ` [KJ] " walter harms
2005-11-08 18:59   ` Matthew Dobson
2005-11-08  1:00 ` Matthew Dobson [this message]
2005-11-08  1:00   ` [PATCH 8/8] Inline 3 functions Matthew Dobson
2005-11-08  7:39   ` [KJ] " Pekka J Enberg
2005-11-08  7:39     ` Pekka J Enberg
2005-11-08 18:59     ` [KJ] " Christoph Lameter
2005-11-08 18:59       ` Christoph Lameter
2005-11-08 19:08     ` [KJ] " Matthew Dobson
2005-11-08 19:08       ` Matthew Dobson
2005-11-10 10:42       ` [KJ] " Adrian Bunk
2005-11-10 10:42         ` Adrian Bunk
2005-11-10 17:04         ` [KJ] " Matthew Dobson
2005-11-10 17:04           ` Matthew Dobson
2005-11-10 17:38           ` [KJ] " Adrian Bunk
2005-11-10 17:38             ` Adrian Bunk
2005-11-10 18:04             ` [KJ] " Oliver Neukum
2005-11-10 18:04               ` Oliver Neukum
2005-11-10 18:20               ` [KJ] " Adrian Bunk
2005-11-10 18:20                 ` Adrian Bunk
2005-11-10 19:22                 ` [KJ] " Oliver Neukum
2005-11-10 19:22                   ` Oliver Neukum
2005-11-10 20:43                   ` [KJ] " Adrian Bunk
2005-11-10 20:43                     ` Adrian Bunk
2005-11-08  7:58 ` [KJ] Re: [PATCH 0/8] Cleanup slab.c Pekka J Enberg
2005-11-08  7:58   ` Pekka J Enberg
2005-11-08 18:56   ` [KJ] " Matthew Dobson
2005-11-08 18:56     ` Matthew Dobson

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=436FF894.8090204@us.ibm.com \
    --to=colpatch@us.ibm.com \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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.