[RFC][PATCH 5/7] printk: drop vprintk_func function
From: Sergey Senozhatsky
Date: Tue Sep 27 2016 - 10:25:18 EST
Drop vprintk_func() function and use this_cpu_read(printk_func),
since now we always have alt_printk enabled.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
---
kernel/printk/internal.h | 4 ----
kernel/printk/printk.c | 4 ++--
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
index 3eebf6d..b030ca0 100644
--- a/kernel/printk/internal.h
+++ b/kernel/printk/internal.h
@@ -31,10 +31,6 @@ extern raw_spinlock_t logbuf_lock;
* via per-CPU variable.
*/
DECLARE_PER_CPU(printk_func_t, printk_func);
-static inline __printf(1, 0) int vprintk_func(const char *fmt, va_list args)
-{
- return this_cpu_read(printk_func)(fmt, args);
-}
void alt_printk_enter(void);
void alt_printk_exit(void);
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index c7ffbef..2afa16b 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1922,7 +1922,7 @@ EXPORT_SYMBOL(vprintk_emit);
asmlinkage int vprintk(const char *fmt, va_list args)
{
- return vprintk_func(fmt, args);
+ return this_cpu_read(printk_func)(fmt, args);
}
EXPORT_SYMBOL(vprintk);
@@ -1984,7 +1984,7 @@ asmlinkage __visible int printk(const char *fmt, ...)
int r;
va_start(args, fmt);
- r = vprintk_func(fmt, args);
+ r = this_cpu_read(printk_func)(fmt, args);
va_end(args);
return r;
--
2.10.0.372.g6fe1b14