From patchwork Tue Feb 9 11:08:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 379684 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A388EC433E6 for ; Tue, 9 Feb 2021 11:14:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6092B64E7C for ; Tue, 9 Feb 2021 11:14:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbhBILOH (ORCPT ); Tue, 9 Feb 2021 06:14:07 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:12883 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbhBILLy (ORCPT ); Tue, 9 Feb 2021 06:11:54 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4DZgC80hJcz7jJn; Tue, 9 Feb 2021 19:09:40 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Tue, 9 Feb 2021 19:10:57 +0800 From: Yicong Yang To: , , , , , , , , , , , , , , CC: , , Subject: [PATCH v2 1/4] driver core: Use subdir-ccflags-* to inherit debug flag Date: Tue, 9 Feb 2021 19:08:16 +0800 Message-ID: <1612868899-9185-2-git-send-email-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1612868899-9185-1-git-send-email-yangyicong@hisilicon.com> References: <1612868899-9185-1-git-send-email-yangyicong@hisilicon.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Junhao He 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 Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- 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