[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1612868899-9185-2-git-send-email-yangyicong@hisilicon.com>
Date: Tue, 9 Feb 2021 19:08:16 +0800
From: Yicong Yang <yangyicong@...ilicon.com>
To: <gregkh@...uxfoundation.org>, <jdelvare@...e.com>,
<linux@...ck-us.net>, <giometti@...eenne.com>, <abbotti@....co.uk>,
<hsweeten@...ionengravers.com>, <kw@...ux.com>,
<helgaas@...nel.org>, <linux-kernel@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <linux-hwmon@...r.kernel.org>,
<devel@...verdev.osuosl.org>, <linux-kbuild@...r.kernel.org>,
<masahiroy@...nel.org>, <michal.lkml@...kovi.net>
CC: <prime.zeng@...wei.com>, <yangyicong@...ilicon.com>,
<linuxarm@...neuler.org>
Subject: [PATCH v2 1/4] driver core: Use subdir-ccflags-* to inherit debug flag
From: Junhao He <hejunhao2@...ilicon.com>
Currently we can turn on the debug message in the top directory
driver/base and subdirectory driver/base/power with kconfig
option CONFIG_DEBUG_DRIVER. But the DEBUG flags will not
pass to subdirectory drvier/base/firmware_loader which
the ccflags-$(CONFIG_DEBUG_DRIVER) is missing and there is
no kconfig option to turn on the debug message for it.
Use subdir-ccflags-* for the DEBUG flag in the top directory
will fix this. Considering CONFIG_DEBUG_DRIVER intends
to turn on the debug recursively, use subdir-cclags-* will
be clearer and avoid omittance of DEBUG define
in the subdirectory.
Suggested-by: Bjorn Helgaas <bhelgaas@...gle.com>
Signed-off-by: Junhao He <hejunhao2@...ilicon.com>
Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>
---
drivers/base/Makefile | 2 +-
drivers/base/power/Makefile | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/base/Makefile b/drivers/base/Makefile
index 5e7bf96..c6bdf19 100644
--- a/drivers/base/Makefile
+++ b/drivers/base/Makefile
@@ -27,5 +27,5 @@ obj-$(CONFIG_GENERIC_ARCH_TOPOLOGY) += arch_topology.o
obj-y += test/
-ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
+subdir-ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
index 8fdd007..2990167 100644
--- a/drivers/base/power/Makefile
+++ b/drivers/base/power/Makefile
@@ -5,5 +5,3 @@ obj-$(CONFIG_PM_TRACE_RTC) += trace.o
obj-$(CONFIG_PM_GENERIC_DOMAINS) += domain.o domain_governor.o
obj-$(CONFIG_HAVE_CLK) += clock_ops.o
obj-$(CONFIG_PM_QOS_KUNIT_TEST) += qos-test.o
-
-ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
--
2.8.1
Powered by blists - more mailing lists