summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-16 18:35:29 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 18:35:29 -0700
commit96efedf1491cdf0616e5e4fff0711cebf20f69c7 (patch)
tree7134b4c674dd0f1de0bc9356830dd0b51c836fb7 /kernel
parent70498253186586e5dca7bc3ebd3415203b059fbc (diff)
downloadlinux-96efedf1491cdf0616e5e4fff0711cebf20f69c7.tar.gz
linux-96efedf1491cdf0616e5e4fff0711cebf20f69c7.tar.bz2
linux-96efedf1491cdf0616e5e4fff0711cebf20f69c7.zip
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')
-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 {
*/
static DEFINE_RAW_SPINLOCK(logbuf_lock);
+#ifdef CONFIG_PRINTK
/* the next printk record to read by syslog(READ) or /proc/kmsg */
static u64 syslog_seq;
static u32 syslog_idx;
@@ -228,7 +229,6 @@ static u32 log_first_idx;
/* index and sequence number of the next record to store in the buffer */
static u64 log_next_seq;
-#ifdef CONFIG_PRINTK
static u32 log_next_idx;
/* the next printk record to read after the last 'clear' command */
@@ -1635,10 +1635,17 @@ asmlinkage int printk(const char *fmt, ...)
}
EXPORT_SYMBOL(printk);
-#else
+#else /* CONFIG_PRINTK */
#define LOG_LINE_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 {
size_t len;
size_t cons;