[RFC] [PATCH] make add_taint() inline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Randy Dunlap <[email protected]>

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 <[email protected]>
---

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux