All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: [RFC][PATCH] inline a few tiny functions in init/initramfs.c
Date: Sat, 24 Sep 2005 01:26:26 +0200	[thread overview]
Message-ID: <200509240126.26575.jesper.juhl@gmail.com> (raw)


A few functions in init/initramfs.c are so simple that I don't see why *any* 
point in them having to bear the cost of a function call.
Wouldn't something like the patch below make sense ?


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 init/initramfs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.14-rc2-git3-orig/init/initramfs.c	2005-09-22 00:28:39.000000000 +0200
+++ linux-2.6.14-rc2-git3/init/initramfs.c	2005-09-24 01:21:55.000000000 +0200
@@ -14,12 +14,12 @@ static void __init error(char *x)
 		message = x;
 }
 
-static void __init *malloc(size_t size)
+static inline void __init *malloc(size_t size)
 {
 	return kmalloc(size, GFP_KERNEL);
 }
 
-static void __init free(void *where)
+static inline void __init free(void *where)
 {
 	kfree(where);
 }
@@ -155,7 +155,7 @@ static void __init read_into(char *buf, 
 
 static __initdata char *header_buf, *symlink_buf, *name_buf;
 
-static int __init do_start(void)
+static inline int __init do_start(void)
 {
 	read_into(header_buf, 110, GotHeader);
 	return 0;



             reply	other threads:[~2005-09-23 23:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23 23:26 Jesper Juhl [this message]
2005-09-24  4:15 ` [RFC][PATCH] inline a few tiny functions in init/initramfs.c Con Kolivas
2005-09-24  4:52   ` Nick Piggin
2005-09-28  0:07     ` Jesper Juhl
2005-09-28  1:56       ` Nick Piggin
2005-09-28  3:01         ` Coywolf Qi Hunt
2005-09-28 21:38           ` Jesper Juhl

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=200509240126.26575.jesper.juhl@gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.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 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.