Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp12001pxb; Mon, 8 Feb 2021 13:42:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwS7F3xf8BbPqqfulnWjhg//Rnpfq2lDxDr8SIexxumy8BHMgKgqGQdyXdlrnTra+r41L38 X-Received: by 2002:a17:906:1741:: with SMTP id d1mr19535495eje.182.1612820547728; Mon, 08 Feb 2021 13:42:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612820547; cv=none; d=google.com; s=arc-20160816; b=RwMDHEAXM4WPwI/46idwofbHmVst8tCPqMsbtIMZxT7R+7GQyIH4nE3VYJoqix0oYA 8xoY6mRcQ0W6pLyqNt1O8yh05LmPHQYZEf2ZicFCZM7gRJPqMue/qzDLjlnkN5v9VCES Zg4ZLsIXIWzYmUn98BVx5Sws7VHt0gQx8P1JmrIMPGeQvzYWCc6HXlGgU9AHxTNkn4RO SgTC7L80yhgzsne5tvonmeR1FZw3woBHeAX1iPk59bEpGT+XoWrkyBZmP7mjwI/NboP6 uJVasZKYzBbh7hDqPey8IkE0ufAOmNbrhVSu74xM11mCBt77tvex6eRc2LghLHrqALXx NZhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject:sender:dkim-signature; bh=/wBVwDhDiae21VdHyS4ED5wTElYuC56T0HP27SlXgtE=; b=PoI4klDM+3Q3+S1SMXyMFDScqYmzfTOwqf9T7r1vpnQMt3CtVuFIfOa6tDQDxu+ex/ 8MmqHfMHluwXGB5aKMHpqVNLy7eJiFs6d9ZkldxjYZfptksCQhdV+WgO+ddAj7DdQjna oQPlXX8hpdmw2JXQYLBrOU96xoCOUhxhc1SRsI5OA/ZpQnECw74VUthNSdBn5D0UsbPT QLocn48ySTOjSNnFncxGs7aGghdaS34DGPRpez6cU5Asx4aQbmQEf5DkXQ6OUQY+KWvy Olf/o1W+GWWq75+d1YZ7rx+AF9d9EzdusSYL8efhvWgwAY4p3RMXVMvsmnVIUshQqcAR SZRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CUW15GK+; 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 a66si15902988edf.607.2021.02.08.13.42.04; Mon, 08 Feb 2021 13:42:27 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CUW15GK+; 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 S236678AbhBHVkl (ORCPT + 99 others); Mon, 8 Feb 2021 16:40:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbhBHVBa (ORCPT ); Mon, 8 Feb 2021 16:01:30 -0500 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D97AC061788; Mon, 8 Feb 2021 13:00:45 -0800 (PST) Received: by mail-ot1-x32d.google.com with SMTP id y11so15535066otq.1; Mon, 08 Feb 2021 13:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/wBVwDhDiae21VdHyS4ED5wTElYuC56T0HP27SlXgtE=; b=CUW15GK+D/oFv5TbkBvwV1isjKpFSWsiZ0cRSrxAS9WqlrtaEbn7XbL4fv4KbaLuE8 HGkr6tBB170aq1yHzWJH6UEUpfs9UG/1T3juWiHAa4h6ueaO0YDgZH+LAVSvCtuSZwqY K165inKoI38+MIAZBXigzRxsvtBvoyOS7TQtj+rGNpIbW1XO+JJSTvNOdG1hFbnqkxA1 qgdg4kFqEBiYS9MuDucC7gZGdqlJ1o89aFEEmNMVuqS4dfeUL4LL0quBYVxgu7Ht/+ke 4mjAow7DoIebJoNyaGRM3rThKbShc35/k6cBe50bebEtU9hbrQSxV5qkCLVOSYKx69UU KTLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=/wBVwDhDiae21VdHyS4ED5wTElYuC56T0HP27SlXgtE=; b=YONAtPuO4CTSoQgidPaLcSHwjXxNF7z1vPQkSyRSgsmnnzAy62JL8yhXViDX0Lt57G p86fSoBMwxfkl8Z5zpM3sfpfW57rvV+ERzfXxzKUEkVkkfD8oGFUwJp4sxzR1iKK1nWN Z7Upf1KQgj7u/yMxVbNqDg7vUIbzyJRktiZgHqgeI3go2Vy8VNIpgADeNyg9aF6Hgalr 4dE4xUESd2gCdLy3guP1+hbW4sQctSjPnldKOc7jEIRJNKhAcmLP/HG9nipBmDVD1N01 N+3rKS1ngkPavV/QjRCps0eKHIZuGdEfnHrUi5OkAzuYNrjRzQZRfqIznlXdhdKlPUkv 7QaA== X-Gm-Message-State: AOAM532gbY52QPotpeDbHQj5BY9TD6FKkIERu3S8Kau9ZeQUKkTzO+LC AHF69CYwVwQE+bSc7lpsxpK8K02LaB0= X-Received: by 2002:a9d:7ccd:: with SMTP id r13mr13699132otn.253.1612818044809; Mon, 08 Feb 2021 13:00:44 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 62sm2279729oii.23.2021.02.08.13.00.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Feb 2021 13:00:43 -0800 (PST) Sender: Guenter Roeck Subject: Re: [PATCH 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag To: Bjorn Helgaas Cc: Yicong Yang , gregkh@linuxfoundation.org, jdelvare@suse.com, giometti@enneenne.com, abbotti@mev.co.uk, hsweeten@visionengravers.com, kw@linux.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devel@driverdev.osuosl.org, linux-kbuild@vger.kernel.org, masahiroy@kernel.org, michal.lkml@markovi.net, prime.zeng@huawei.com, linuxarm@openeuler.org References: <20210205200859.GA193526@bjorn-Precision-5520> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wG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Jx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= Message-ID: <28707cb4-8f2d-2864-4efe-749ca7ee494c@roeck-us.net> Date: Mon, 8 Feb 2021 13:00:41 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210205200859.GA193526@bjorn-Precision-5520> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/5/21 12:08 PM, Bjorn Helgaas wrote: > On Fri, Feb 05, 2021 at 10:28:32AM -0800, Guenter Roeck wrote: >> On Fri, Feb 05, 2021 at 05:44:13PM +0800, Yicong Yang wrote: >>> From: Junhao He >>> >>> 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 >> >> What problem does this fix ? Maybe I am missing it, but I don't see >> DEBUG being used in a subdirectory of drivers/hwmon. > > It's my fault for raising this question [1]. Yicong fixed a real > problem in drivers/pci, where we are currently using > > ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG > > so CONFIG_PCI_DEBUG=y turns on debug in drivers/pci, but not in the > subdirectories. That's surprising to users. > > So my question was whether we should default to using subdir-ccflags > for -DDEBUG in general, and only use ccflags when we have > subdirectories that have their own debug options, e.g., > > drivers/i2c/Makefile:ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG > drivers/i2c/algos/Makefile:ccflags-$(CONFIG_I2C_DEBUG_ALGO) := -DDEBUG > drivers/i2c/busses/Makefile:ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG > drivers/i2c/muxes/Makefile:ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG > > I mentioned drivers/hwmon along with a few others that have > subdirectories, do not have per-subdirectory debug options, and use > ccflags. I didn't try to determine whether those subdirectories > currently use -DDEBUG. > > In the case of drivers/hwmon, several drivers do use pr_debug(), > and CONFIG_HWMON_DEBUG_CHIP=y turns those on. But if somebody > were to add pr_debug() to drivers/hwmon/occ/common.c, for example, > CONFIG_HWMON_DEBUG_CHIP=y would *not* turn it on. That sounds > surprising to me, but if that's what you intend, that's totally fine. > That does make sense, but that explanation is missing from the description. Guenter > [1] https://lore.kernel.org/r/20210204161048.GA68790@bjorn-Precision-5520 > >>> --- >>> 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 >>>