Skip to contentSkip to conversation

kmemtrace: fix build when CONFIG_KMEMTRACE is disabled

PATCH In review Pekka Enberg 1 participant 2 messages Mar 24, 2009 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kmemtrace: fix build when CONFIG_KMEMTRACE is disabled

From: Pekka Enberg <[email protected]>

Impact: fix build

This patch fixes the following allnoconfig failure:

init/built-in.o: In function `start_kernel':
(.init.text+0x669): undefined reference to `kmemtrace_init'

Cc Eduard - Gabriel Munteanu <[email protected]>
---
 include/trace/kmemtrace.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
include/trace/kmemtrace.h +6 -0
index 7514476..28ee69f 100644
@@ -12,7 +12,13 @@
 #include <linux/tracepoint.h>
 #include <linux/types.h>
 
+#ifdef CONFIG_KMEMTRACE
 extern void kmemtrace_init(void);
+#else
+static inline void kmemtrace_init(void)
+{
+}
+#endif
 
 DECLARE_TRACE(kmalloc,
 	      TP_PROTO(unsigned long call_site,
Signature · 1 line
1.5.4.3
#1 lore raw
Commit-ID:  ebe7ac8e115e6b6e1f4c2a177ba718f43b6bd23e
Gitweb:     http://git.kernel.org/tip/ebe7ac8e115e6b6e1f4c2a177ba718f43b6bd23e
Author:     Pekka Enberg <[email protected]>
AuthorDate: Tue, 24 Mar 2009 12:17:38 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 24 Mar 2009 11:31:51 +0100

kmemtrace: fix build when CONFIG_KMEMTRACE is disabled

Impact: fix build

This patch fixes the following allnoconfig failure:

init/built-in.o: In function `start_kernel':
(.init.text+0x669): undefined reference to `kmemtrace_init'

Cc Eduard - Gabriel Munteanu <[email protected]>

LKML-Reference: <1237889858.25315.75.camel@penberg-laptop>

---
 include/trace/kmemtrace.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
include/trace/kmemtrace.h +6 -0
index 7514476..28ee69f 100644
@@ -12,7 +12,13 @@
 #include <linux/tracepoint.h>
 #include <linux/types.h>
 
+#ifdef CONFIG_KMEMTRACE
 extern void kmemtrace_init(void);
+#else
+static inline void kmemtrace_init(void)
+{
+}
+#endif
 
 DECLARE_TRACE(kmalloc,
 	      TP_PROTO(unsigned long call_site,