提交 96efedf1 编写于 作者: K Kay Sievers 提交者: Greg Kroah-Hartman

kmsg - avoid warning for CONFIG_PRINTK=n compilations

Signed-off-by: NKay Sievers <kay@vrfy.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 70498253
...@@ -216,6 +216,7 @@ struct log { ...@@ -216,6 +216,7 @@ struct log {
*/ */
static DEFINE_RAW_SPINLOCK(logbuf_lock); static DEFINE_RAW_SPINLOCK(logbuf_lock);
#ifdef CONFIG_PRINTK
/* the next printk record to read by syslog(READ) or /proc/kmsg */ /* the next printk record to read by syslog(READ) or /proc/kmsg */
static u64 syslog_seq; static u64 syslog_seq;
static u32 syslog_idx; static u32 syslog_idx;
...@@ -228,7 +229,6 @@ static u32 log_first_idx; ...@@ -228,7 +229,6 @@ static u32 log_first_idx;
/* index and sequence number of the next record to store in the buffer */ /* index and sequence number of the next record to store in the buffer */
static u64 log_next_seq; static u64 log_next_seq;
#ifdef CONFIG_PRINTK
static u32 log_next_idx; static u32 log_next_idx;
/* the next printk record to read after the last 'clear' command */ /* the next printk record to read after the last 'clear' command */
...@@ -1635,10 +1635,17 @@ asmlinkage int printk(const char *fmt, ...) ...@@ -1635,10 +1635,17 @@ asmlinkage int printk(const char *fmt, ...)
} }
EXPORT_SYMBOL(printk); EXPORT_SYMBOL(printk);
#else #else /* CONFIG_PRINTK */
#define LOG_LINE_MAX 0 #define LOG_LINE_MAX 0
#define PREFIX_MAX 0 #define PREFIX_MAX 0
#define LOG_LINE_MAX 0
static u64 syslog_seq;
static u32 syslog_idx;
static enum log_flags syslog_prev;
static u64 log_first_seq;
static u32 log_first_idx;
static u64 log_next_seq;
static struct cont { static struct cont {
size_t len; size_t len;
size_t cons; size_t cons;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册