Re: linux-next: build failure after merge of the pm tree

Rafael J. Wysocki
2011-09-28T14:45:44Z

On Wednesday, September 28, 2011, Rafael J. Wysocki wrote:
> On Wednesday, September 28, 2011, Ming Lei wrote:
> > Hi Stephen and Rafael,
> >
> > Sorry, the attachment patch can fix the build failure, which is
> > caused by unset CONFIG_RUNTIME_PM.
>
> First off, that's CONFIG_PM_RUNTIME. Second, why do you want to build
> rpm-traces.c at all if CONFIG_PM_RUNTIME is unset?

IOW, what about the appended patch instead?

Rafael

---
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: PM / Tracing: Build runtime PM tracepoints if PM_RUNTIME is set

Do not build kernel/trace/rpm-traces.c if CONFIG_PM_RUNTIME is not
set, which avoids a build failure.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/Kconfig | 4 ++++
kernel/trace/Makefile | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)

Index: linux/kernel/power/Kconfig
===================================================================
--- linux.orig/kernel/power/Kconfig
+++ linux/kernel/power/Kconfig
@@ -238,3 +238,7 @@ config PM_GENERIC_DOMAINS
config PM_GENERIC_DOMAINS_RUNTIME
def_bool y
depends on PM_RUNTIME && PM_GENERIC_DOMAINS
+
+config RUNTIME_PM_TRACEPOINTS
+ def_bool y
+ depends on PM_RUNTIME && TRACEPOINTS
Index: linux/kernel/trace/Makefile
===================================================================
--- linux.orig/kernel/trace/Makefile
+++ linux/kernel/trace/Makefile
@@ -53,7 +53,7 @@ endif
obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o
obj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o
obj-$(CONFIG_TRACEPOINTS) += power-traces.o
-obj-$(CONFIG_TRACEPOINTS) += rpm-traces.o
+obj-$(CONFIG_RUNTIME_PM_TRACEPOINTS) += rpm-traces.o
ifeq ($(CONFIG_TRACING),y)
obj-$(CONFIG_KGDB_KDB) += trace_kdb.o
endif