diff options
author | Kay Sievers <kay@vrfy.org> | 2012-07-16 21:35:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-16 21:35:29 -0400 |
commit | 96efedf1491cdf0616e5e4fff0711cebf20f69c7 (patch) | |
tree | 7134b4c674dd0f1de0bc9356830dd0b51c836fb7 /kernel/printk.c | |
parent | 70498253186586e5dca7bc3ebd3415203b059fbc (diff) |
kmsg - avoid warning for CONFIG_PRINTK=n compilations
Signed-off-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index d87ca5c6a989..6c3d5bf14da2 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -216,6 +216,7 @@ struct log { | |||
216 | */ | 216 | */ |
217 | static DEFINE_RAW_SPINLOCK(logbuf_lock); | 217 | static DEFINE_RAW_SPINLOCK(logbuf_lock); |
218 | 218 | ||
219 | #ifdef CONFIG_PRINTK | ||
219 | /* the next printk record to read by syslog(READ) or /proc/kmsg */ | 220 | /* the next printk record to read by syslog(READ) or /proc/kmsg */ |
220 | static u64 syslog_seq; | 221 | static u64 syslog_seq; |
221 | static u32 syslog_idx; | 222 | static u32 syslog_idx; |
@@ -228,7 +229,6 @@ static u32 log_first_idx; | |||
228 | 229 | ||
229 | /* index and sequence number of the next record to store in the buffer */ | 230 | /* index and sequence number of the next record to store in the buffer */ |
230 | static u64 log_next_seq; | 231 | static u64 log_next_seq; |
231 | #ifdef CONFIG_PRINTK | ||
232 | static u32 log_next_idx; | 232 | static u32 log_next_idx; |
233 | 233 | ||
234 | /* the next printk record to read after the last 'clear' command */ | 234 | /* the next printk record to read after the last 'clear' command */ |
@@ -1635,10 +1635,17 @@ asmlinkage int printk(const char *fmt, ...) | |||
1635 | } | 1635 | } |
1636 | EXPORT_SYMBOL(printk); | 1636 | EXPORT_SYMBOL(printk); |
1637 | 1637 | ||
1638 | #else | 1638 | #else /* CONFIG_PRINTK */ |
1639 | 1639 | ||
1640 | #define LOG_LINE_MAX 0 | 1640 | #define LOG_LINE_MAX 0 |
1641 | #define PREFIX_MAX 0 | 1641 | #define PREFIX_MAX 0 |
1642 | #define LOG_LINE_MAX 0 | ||
1643 | static u64 syslog_seq; | ||
1644 | static u32 syslog_idx; | ||
1645 | static enum log_flags syslog_prev; | ||
1646 | static u64 log_first_seq; | ||
1647 | static u32 log_first_idx; | ||
1648 | static u64 log_next_seq; | ||
1642 | static struct cont { | 1649 | static struct cont { |
1643 | size_t len; | 1650 | size_t len; |
1644 | size_t cons; | 1651 | size_t cons; |