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 From patchwork Tue Feb 9 11:08:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 380551 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=ham 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 0E781C43381 for ; Tue, 9 Feb 2021 11:14:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA11264E79 for ; Tue, 9 Feb 2021 11:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231282AbhBILN6 (ORCPT ); Tue, 9 Feb 2021 06:13:58 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:12900 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232330AbhBILLy (ORCPT ); Tue, 9 Feb 2021 06:11:54 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DZgCX4gy3zjKGw; Tue, 9 Feb 2021 19:10:00 +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 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag Date: Tue, 9 Feb 2021 19:08:17 +0800 Message-ID: <1612868899-9185-3-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 We use ccflags-$(CONFIG_HWMON_DEBUG_CHIP) for the debug message in drivers/hwmon, but the DEBUG flag will not pass to the subdirectory. Considering CONFIG_HWMON_DEBUG_CHIP intends to have DEBUG recursively in driver/hwmon. It will be clearer to use subdir-ccflags-* instead of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories, and it will avoid omittance of DEBUG define when debug messages added in the subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/hwmon/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 09a86c5..1c0c089 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -201,5 +201,5 @@ obj-$(CONFIG_SENSORS_XGENE) += xgene-hwmon.o obj-$(CONFIG_SENSORS_OCC) += occ/ obj-$(CONFIG_PMBUS) += pmbus/ -ccflags-$(CONFIG_HWMON_DEBUG_CHIP) := -DDEBUG +subdir-ccflags-$(CONFIG_HWMON_DEBUG_CHIP) := -DDEBUG From patchwork Tue Feb 9 11:08:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 379685 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 BFF06C433E6 for ; Tue, 9 Feb 2021 11:14:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F66664E79 for ; Tue, 9 Feb 2021 11:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229959AbhBILOB (ORCPT ); Tue, 9 Feb 2021 06:14:01 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:12901 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232306AbhBILLx (ORCPT ); Tue, 9 Feb 2021 06:11:53 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DZgCX59DdzjKJZ; Tue, 9 Feb 2021 19:10:00 +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:58 +0800 From: Yicong Yang To: , , , , , , , , , , , , , , CC: , , Subject: [PATCH v2 3/4] pps: Use subdir-ccflags-* to inherit debug flag Date: Tue, 9 Feb 2021 19:08:18 +0800 Message-ID: <1612868899-9185-4-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 We use ccflags-$(CONFIG_PPS_DEBUG) for the debug message in drivers/pps, but the DEBUG flag will not pass to the subdirectory. Considering CONFIG_HWMON_DEBUG_CHIP intends to turn on debug recursively under driver/pps, so it will be clearer to use subdir-ccflags-* instead of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/pps/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pps/Makefile b/drivers/pps/Makefile index ceaf65c..7a2d3f7 100644 --- a/drivers/pps/Makefile +++ b/drivers/pps/Makefile @@ -8,4 +8,4 @@ pps_core-$(CONFIG_NTP_PPS) += kc.o obj-$(CONFIG_PPS) := pps_core.o obj-y += clients/ generators/ -ccflags-$(CONFIG_PPS_DEBUG) := -DDEBUG +subdir-ccflags-$(CONFIG_PPS_DEBUG) := -DDEBUG From patchwork Tue Feb 9 11:08:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 379686 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 8F282C433DB for ; Tue, 9 Feb 2021 11:14:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3822264E79 for ; Tue, 9 Feb 2021 11:14:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230295AbhBILN4 (ORCPT ); Tue, 9 Feb 2021 06:13:56 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:12902 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232367AbhBILLz (ORCPT ); Tue, 9 Feb 2021 06:11:55 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DZgCX5gBPzjKK8; Tue, 9 Feb 2021 19:10:00 +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:58 +0800 From: Yicong Yang To: , , , , , , , , , , , , , , CC: , , Subject: [PATCH v2 4/4] staging: comedi: Use subdir-ccflags-* to inherit debug flag Date: Tue, 9 Feb 2021 19:08:19 +0800 Message-ID: <1612868899-9185-5-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 As CONFIG_COMEDI_DEBUG intends to have the DEBUG flag recursively under drivers/staging/comedi, use subdir-ccflags-* instead of ccflags-* will make it clearer as the DEBUG flag will be inherited when traversing subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/staging/comedi/Makefile | 2 +- drivers/staging/comedi/drivers/Makefile | 1 - drivers/staging/comedi/drivers/tests/Makefile | 2 -- drivers/staging/comedi/kcomedilib/Makefile | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/comedi/Makefile b/drivers/staging/comedi/Makefile index 072ed83..f51cc14 100644 --- a/drivers/staging/comedi/Makefile +++ b/drivers/staging/comedi/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG +subdir-ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG comedi-y := comedi_fops.o range.o drivers.o \ comedi_buf.o diff --git a/drivers/staging/comedi/drivers/Makefile b/drivers/staging/comedi/drivers/Makefile index b24ac00..7cafc36 100644 --- a/drivers/staging/comedi/drivers/Makefile +++ b/drivers/staging/comedi/drivers/Makefile @@ -1,7 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for individual comedi drivers # -ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG # Comedi "helper" modules obj-$(CONFIG_COMEDI_8254) += comedi_8254.o diff --git a/drivers/staging/comedi/drivers/tests/Makefile b/drivers/staging/comedi/drivers/tests/Makefile index b5d8e13..44ac13d 100644 --- a/drivers/staging/comedi/drivers/tests/Makefile +++ b/drivers/staging/comedi/drivers/tests/Makefile @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for comedi drivers unit tests # -ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG - obj-$(CONFIG_COMEDI_TESTS) += example_test.o ni_routes_test.o CFLAGS_ni_routes_test.o := -DDEBUG diff --git a/drivers/staging/comedi/kcomedilib/Makefile b/drivers/staging/comedi/kcomedilib/Makefile index 8031142..9f20318 100644 --- a/drivers/staging/comedi/kcomedilib/Makefile +++ b/drivers/staging/comedi/kcomedilib/Makefile @@ -1,6 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG - obj-$(CONFIG_COMEDI_KCOMEDILIB) += kcomedilib.o kcomedilib-objs := kcomedilib_main.o