From: wfg@linux.intel.com
To: kernel-janitors@vger.kernel.org
Subject: [driver-core:driver-core-linus 6/6] 'syslog_partial' defined but not used on !CONFIG_PRINTK
Date: Tue, 10 Jul 2012 00:15:09 +0000 [thread overview]
Message-ID: <20120710001509.GD5584@localhost> (raw)
Hi Kay,
There are new compile warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-linus
head: eb02dac93708f581c99858a19162af8ca2b6bfcb
commit: eb02dac93708f581c99858a19162af8ca2b6bfcb [6/6] kmsg: /proc/kmsg - support reading of partial log records
All warnings:
kernel/printk.c:220:15: warning: 'syslog_partial' defined but not used [-Wunused-variable]
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;
221
222 /* index and sequence number of the first record stored in the buffer */
223 static u64 log_first_seq;
The problem is, syslog_partial is defined outside of CONFIG_PRINTK and
used inside it:
static size_t syslog_partial;
#ifdef CONFIG_PRINTK
syslog_partial = 0;
skip = syslog_partial;
if (n - syslog_partial <= size) {
n -= syslog_partial;
syslog_partial = 0;
syslog_partial += n;
int do_syslog(int type, char __user *buf, int len, bool from_file)
syslog_partial = 0;
error -= syslog_partial;
return do_syslog(type, buf, len, SYSLOG_FROM_CALL);
#endif /* CONFIG_PRINTK */
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com> Intel Corporation
next reply other threads:[~2012-07-10 0:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 0:15 wfg [this message]
2012-07-10 21:24 ` [driver-core:driver-core-linus 6/6] 'syslog_partial' defined but not used on !CONFIG_PRINTK Kay Sievers
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=20120710001509.GD5584@localhost \
--to=wfg@linux.intel.com \
--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.