aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-16 21:35:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 21:35:29 -0400
commit96efedf1491cdf0616e5e4fff0711cebf20f69c7 (patch)
tree7134b4c674dd0f1de0bc9356830dd0b51c836fb7 /kernel/printk.c
parent70498253186586e5dca7bc3ebd3415203b059fbc (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.c11
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 */
217static DEFINE_RAW_SPINLOCK(logbuf_lock); 217static 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 */
220static u64 syslog_seq; 221static u64 syslog_seq;
221static u32 syslog_idx; 222static 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 */
230static u64 log_next_seq; 231static u64 log_next_seq;
231#ifdef CONFIG_PRINTK
232static u32 log_next_idx; 232static 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}
1636EXPORT_SYMBOL(printk); 1636EXPORT_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
1643static u64 syslog_seq;
1644static u32 syslog_idx;
1645static enum log_flags syslog_prev;
1646static u64 log_first_seq;
1647static u32 log_first_idx;
1648static u64 log_next_seq;
1642static struct cont { 1649static struct cont {
1643 size_t len; 1650 size_t len;
1644 size_t cons; 1651 size_t cons;