All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay@vrfy.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [driver-core:driver-core-linus 6/6] 'syslog_partial' defined but not used on !CONFIG_PRINTK
Date: Tue, 10 Jul 2012 21:24:51 +0000	[thread overview]
Message-ID: <1341955491.810.3.camel@mop> (raw)
In-Reply-To: <20120710001509.GD5584@localhost>

On Tue, 2012-07-10 at 08:15 +0800, wfg@linux.intel.com wrote:
> There are new compile warnings show up in
> 
> vim +220 kernel/printk.c
>    217	/* the next printk record to read by syslog(READ) or /proc/kmsg */
>    218	static u64 syslog_seq;
>    219	static u32 syslog_idx;
>  > 220	static size_t syslog_partial;

Oh, that again, sorry. :)

I moved all variables out of the weird ifdef mess now, that should make it
a bit easier to avoid forgetting that.

Thanks,
Kay


From: Kay Sievers <kay@vrfy.org>
Subject: kmsg - avoid warning for CONFIG_PRINTK=n compilations

Signed-off-by: Kay Sievers <kay@vrfy.org>
---

 kernel/printk.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- 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 */
@@ -1631,9 +1631,15 @@ asmlinkage int printk(const char *fmt, .
 }
 EXPORT_SYMBOL(printk);
 
-#else
+#else /* CONFIG_PRINTK */
 
 #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;



      reply	other threads:[~2012-07-10 21:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10  0:15 [driver-core:driver-core-linus 6/6] 'syslog_partial' defined but not used on !CONFIG_PRINTK wfg
2012-07-10 21:24 ` Kay Sievers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341955491.810.3.camel@mop \
    --to=kay@vrfy.org \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.