lkml.org 
[lkml]   [2005]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC] [PATCH] make add_taint() inline
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-09-11 19:47    [W:0.158 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site