mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: donate <donate@madrone.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: akpm <akpm@osdl.org>
Subject: [RFC] [PATCH] make add_taint() inline
Date: Sun, 11 Sep 2005 10:44:37 -0700	[thread overview]
Message-ID: <20050911104437.6445ff20.donate@madrone.org> (raw)
In-Reply-To: <20050911103757.7cc1f50f.rdunlap@xenotime.net>

From: Randy Dunlap <rdunlap@xenotime.net>

add_taint() is a trivial function.
No need to call it out-of-line, just make it inline and
remove its export.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---

 arch/x86_64/kernel/mce_intel.c |    1 +
 include/linux/kernel.h         |    5 ++++-
 kernel/panic.c                 |    6 ------
 3 files changed, 5 insertions(+), 7 deletions(-)

diff -Naurp linux-2613-git10/arch/x86_64/kernel/mce_intel.c~add_taint_inline linux-2613-git10/arch/x86_64/kernel/mce_intel.c
--- linux-2613-git10/arch/x86_64/kernel/mce_intel.c~add_taint_inline	2005-09-10 21:58:37.000000000 -0700
+++ linux-2613-git10/arch/x86_64/kernel/mce_intel.c	2005-09-10 21:58:55.000000000 -0700
@@ -5,6 +5,7 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/kernel.h>
 #include <linux/percpu.h>
 #include <asm/processor.h>
 #include <asm/msr.h>
diff -Naurp linux-2613-git10/include/linux/kernel.h~add_taint_inline linux-2613-git10/include/linux/kernel.h
--- linux-2613-git10/include/linux/kernel.h~add_taint_inline	2005-08-28 16:41:01.000000000 -0700
+++ linux-2613-git10/include/linux/kernel.h	2005-09-10 21:54:13.000000000 -0700
@@ -172,7 +172,10 @@ extern int panic_timeout;
 extern int panic_on_oops;
 extern int tainted;
 extern const char *print_tainted(void);
-extern void add_taint(unsigned);
+static inline void add_taint(unsigned flag)
+{
+	tainted |= flag;
+}
 
 /* Values used for system_state */
 extern enum system_states {
diff -Naurp linux-2613-git10/kernel/panic.c~add_taint_inline linux-2613-git10/kernel/panic.c
--- linux-2613-git10/kernel/panic.c~add_taint_inline	2005-08-28 16:41:01.000000000 -0700
+++ linux-2613-git10/kernel/panic.c	2005-09-10 21:55:04.000000000 -0700
@@ -167,9 +167,3 @@ const char *print_tainted(void)
 		snprintf(buf, sizeof(buf), "Not tainted");
 	return(buf);
 }
-
-void add_taint(unsigned flag)
-{
-	tainted |= flag;
-}
-EXPORT_SYMBOL(add_taint);

       reply	other threads:[~2005-09-11 17:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050911103757.7cc1f50f.rdunlap@xenotime.net>
2005-09-11 17:44 ` donate [this message]
2005-09-11 18:22   ` Kyle Moffett
2005-09-11 22:56     ` Randy.Dunlap
2005-09-11 23:10       ` Kyle Moffett
2005-09-11 19:44   ` Andrew Morton
2005-09-11 22:52     ` Randy.Dunlap

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=20050911104437.6445ff20.donate@madrone.org \
    --to=donate@madrone.org \
    --cc=akpm@osdl.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®