From: Randy Dunlap <randy.dunlap@oracle.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Simon Kagstrom <simon.kagstrom@netinsight.net>
Subject: [PATCH -next] kmsg_dump: fix build for CONFIG_PRINTK=n
Date: Tue, 01 Dec 2009 10:52:02 -0800 [thread overview]
Message-ID: <4B1565D2.2030505@oracle.com> (raw)
In-Reply-To: <20091201190301.0fb7abad.sfr@canb.auug.org.au>
From: Randy Dunlap <randy.dunlap@oracle.com>
kmsg_dump() fails to build when CONFIG_PRINTK=n; provide stubs
for the kmsg_dump*() functions when CONFIG_PRINTK=n.
kernel/printk.c: In function 'kmsg_dump':
kernel/printk.c:1501: error: 'log_buf_len' undeclared (first use in this function)
kernel/printk.c:1502: error: 'logged_chars' undeclared (first use in this function)
kernel/printk.c:1506: error: 'log_buf' undeclared (first use in this function)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
include/linux/kmsg_dump.h | 16 ++++++++++++++++
kernel/printk.c | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
--- linux-next-20091201.orig/kernel/printk.c
+++ linux-next-20091201/kernel/printk.c
@@ -1406,7 +1406,6 @@ bool printk_timed_ratelimit(unsigned lon
return false;
}
EXPORT_SYMBOL(printk_timed_ratelimit);
-#endif
static DEFINE_SPINLOCK(dump_list_lock);
static LIST_HEAD(dump_list);
@@ -1525,3 +1524,4 @@ void kmsg_dump(enum kmsg_dump_reason rea
dumper->dump(dumper, reason, s1, l1, s2, l2);
spin_unlock_irqrestore(&dump_list_lock, flags);
}
+#endif
--- linux-next-20091201.orig/include/linux/kmsg_dump.h
+++ linux-next-20091201/include/linux/kmsg_dump.h
@@ -35,10 +35,26 @@ struct kmsg_dumper {
int registered;
};
+#ifdef CONFIG_PRINTK
void kmsg_dump(enum kmsg_dump_reason reason);
int kmsg_dump_register(struct kmsg_dumper *dumper);
int kmsg_dump_unregister(struct kmsg_dumper *dumper);
+#else
+static inline void kmsg_dump(enum kmsg_dump_reason reason)
+{
+}
+
+static inline int kmsg_dump_register(struct kmsg_dumper *dumper)
+{
+ return -EINVAL;
+}
+
+static inline int kmsg_dump_unregister(struct kmsg_dumper *dumper)
+{
+ return -EINVAL;
+}
+#endif
#endif /* _LINUX_KMSG_DUMP_H */
next prev parent reply other threads:[~2009-12-01 18:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 8:03 linux-next: Tree for December 1 Stephen Rothwell
2009-12-01 8:42 ` Michal Simek
2009-12-01 10:03 ` problems in linux-next (Was: Re: linux-next: Tree for December 1) Stephen Rothwell
2009-12-01 14:50 ` Tejun Heo
2009-12-01 15:48 ` Christoph Lameter
2009-12-01 16:01 ` Ingo Molnar
2009-12-01 23:24 ` Tejun Heo
2009-12-02 7:55 ` Tejun Heo
2009-12-02 11:19 ` Michal Simek
2009-12-02 12:13 ` Tejun Heo
2009-12-02 14:55 ` Christoph Lameter
2009-12-02 22:16 ` Tejun Heo
2009-12-02 22:24 ` Christoph Lameter
2009-12-02 23:00 ` Tejun Heo
2009-12-02 5:40 ` Tejun Heo
2009-12-02 6:05 ` Stephen Rothwell
2009-12-01 10:29 ` linux-next: Tree for December 1 Mark Brown
2009-12-01 10:43 ` Takashi Iwai
2009-12-01 11:19 ` Stephen Rothwell
2009-12-01 10:57 ` Stephen Rothwell
2009-12-01 18:51 ` [PATCH -next] media/radio/miro: depends on SND Randy Dunlap
2009-12-01 18:52 ` Randy Dunlap [this message]
2009-12-02 8:35 ` [PATCH -next] kmsg_dump: fix build for CONFIG_PRINTK=n Simon Kagstrom
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=4B1565D2.2030505@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=simon.kagstrom@netinsight.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).