Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp396019pxb; Tue, 9 Feb 2021 03:16:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyd+gx8Y7NL7ioSU9c0fbUFABrbtmy7zeTcPCtHDveRvCPb8p2DBCy0mS5HKKj21w8fhzTe X-Received: by 2002:a05:6402:1109:: with SMTP id u9mr7972878edv.385.1612869386104; Tue, 09 Feb 2021 03:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612869386; cv=none; d=google.com; s=arc-20160816; b=xtIpubw+21LFb3YSH4Wz5xF5pJodI3HLRoeXx7sEziu8oorSR6pqurlV8flrddQkos SgQuQCmVIg2q8ADcwrTerA5X4DPreK3ehYIS0jOvQTob1LU1xZw5qCC/qWhouO46eMu+ IaWLW2mvnlf6Zw1UPqQPfj5SXWJlXzUa/5cgCXLzmrYV9ZPIgYhSef0F3mb+jEXmzkEV +90RqwwBz9S8rZJ/LfS3T9k2m2CWPOXV2uw9lNubB8v6ggm3v97O9d0rsKKHZR9tCI+H yjj2lz8rOa/7CEsvZkvR9/An1PQNJwj5ubhXAiG/tywjThccmcKWXRbQk1XLbi/3TS5W D9mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=DbI+AWbpCUWd+rjwg8CCx8E0FwVx38gtBzaWDmdRleY=; b=O5u/iVjGIHdw03eKn97pI0+RgUw+/S7Ou03rNlTquikmUcTwmDWhkVPZSXUSVu8fGI ZTB46DqAatT6XDXB2L+d2HXReQu+ctM1HjcfD0X2rpold9RFp4H/fyMKm315gLBwMxl9 hSM5Nhmdoczhp3iHwB5v1Ll53d0BSjkALWVua8q0fDzlQKB7jkQwF8T2G0llzP+gDgfq mk0wtmcBVNLCX0exJjHImLbT+L6/cg8AtEQVATBhk2w6tDssCSWOo+bfDytxgAjom5Yy xqc3s+27rqfPWyv0VvGmc30MAM48L5fqy2H8lHP5rW/9XSWHxui/QeD9lmoZznkNG/0j +zGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b33si9705539edf.109.2021.02.09.03.16.02; Tue, 09 Feb 2021 03:16:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230365AbhBILOg (ORCPT + 99 others); Tue, 9 Feb 2021 06:14:36 -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 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 -- 2.8.1