Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp558972pxb; Tue, 9 Feb 2021 07:11:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzt90EvHowweQ1VFhZn/7qMskdW/YFcoIISmfjx8/+m0Q2iumWIkWtmtwWeIQ3ahtZPIafY X-Received: by 2002:a05:6402:100b:: with SMTP id c11mr23065564edu.193.1612883492950; Tue, 09 Feb 2021 07:11:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612883492; cv=none; d=google.com; s=arc-20160816; b=bFrjcNaOe7a07NSXvmjSEbGOeTOQB8yxUP2rO5LoMkB7j5mzL7nZgowCBz4Akw7Z32 JK90RegxaK175lBD3AUjuCWSZ1Fn083t6O/NG/XbFNl0NLpj1hR1Q8iNXgO+wdWlL/iF EGTLTKCIpA+i6iSX9fhWdJbRySRDouXeBV6tXiPlvS+n8i1iAy8mr+Xo93wCMwar5nhR RgzpVdzJs85gYeXp0Ma8jfnsfeoRDFFpoI8UBVA7j8YriOgp3BEMM8zIQUaXyBmcibxo P5RxQVlsw5PHqBqcvjf25ReLaq63xKZKi1mbxDO5V91LN+swG3wJT7wjDZNz1/cklPv1 hY1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :dkim-signature; bh=bjxmsAAlaEuDY9+PSLnzX23gCEFtWGdplw8kECzDAe0=; b=zai47L0irkl882GtNiV5LPNVU3eZQlf7LtTwdREWuBVyOlsXGE8KCQ66CvAGdhhO6Y mXHaEldc9ih9HUbmOOJssTZ05FqOtb51C26w4IUWuBHEmCdLmmfxWJGnYYDRYWNB8K90 gL6g7WaCrOL0xVsH+j1C/mbqEhakPoJIDopH+beO4c9nyfg+spXXtxPkjm0FW3BCUlCT k3WbNOlaFIzeMjT5Q5dHAyRiwuJ38X6qbAEyrhS693c1C8aLfI3N3a36UGz8KQyK+MWk 4RIsEIk6XJkn8yjW1idHP4VEhzCgKH6enyRS7EiLUG2MPBMPxNnYQdJyXy73Bdgm/M15 pk5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j0Lv1K0l; 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 bo4si14583785edb.420.2021.02.09.07.11.04; Tue, 09 Feb 2021 07:11:32 -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=j0Lv1K0l; 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 S232069AbhBIPHp (ORCPT + 99 others); Tue, 9 Feb 2021 10:07:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232014AbhBIPHm (ORCPT ); Tue, 9 Feb 2021 10:07:42 -0500 Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D64E3C06178A; Tue, 9 Feb 2021 07:07:01 -0800 (PST) Received: by mail-oo1-xc2d.google.com with SMTP id 123so4311658ooi.13; Tue, 09 Feb 2021 07:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bjxmsAAlaEuDY9+PSLnzX23gCEFtWGdplw8kECzDAe0=; b=j0Lv1K0lAyO/aXssmrb2JSZHcKCXRO4dHOzcsVMzGZ65kKP2JFgGXgG/PaJsPQmWyL PH8Szb7vv3OS37Av5B78PgUF9qUpBk+6szQZ0Mfc8jSxBierincFetlK43SpuOzrUSix JDDATP8QCbQ/aXeHyIJqqZd7pJSUDfMkAMtY2cLwiTzpZBSQR2VGEVrGoEiA/22eFBBo +2ZJvXCwq/arwcW35AZo8Y99RUJ3pHuVD2TUi39R4P3fZW+D3AHUywDpJIcez+2zvwAw fDD91rMnpF03sjoHuA3XsLqaWXEjraCCqrggCHNCij4oj5FWSNRnCtWAs9gcs4N0aJNk ZQ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=bjxmsAAlaEuDY9+PSLnzX23gCEFtWGdplw8kECzDAe0=; b=YJIY52PEM4ulXD/cjpIJtQfHfoIPkiYCOukIwyFI4G/+FxhMVrs51yjRk5sQDco0iz pLzXaKIpLSq7yQZ257pRcGzizqprQmAiTYOiFQ2o8uzflnEoqiGYKAL42DLOY0EQhS/z +XFLy6Ck4IWtnLqVRs8ZodsxW7WmKPXFPzKcCorvcf/3/1rK4yK7mZ4tE0wniSm8rPr5 qD+tK3EWaPPGGJnxlIPgHAbOKTwbxKDyAVN3e1hr6TECp5FlLStbQJryHDjk11Q9g3Sg cgJSkTxeIhjnnyzw58HyBbUhNPzAUFxBMJg0eNmFD8los4gYCiof/3AUlkn4lVZwqaKh tk3w== X-Gm-Message-State: AOAM532ZyTEl8RsS3B/kVAaNRyYBXgIc9vrVHUYsHaw9adMndNOHblzF pJ7fuUa1r2/NHQ1cfcRiJVg= X-Received: by 2002:a4a:97a7:: with SMTP id w36mr1076981ooi.64.1612883221140; Tue, 09 Feb 2021 07:07:01 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id p23sm4534821otk.51.2021.02.09.07.06.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Feb 2021 07:07:00 -0800 (PST) Sender: Guenter Roeck Date: Tue, 9 Feb 2021 07:06:58 -0800 From: Guenter Roeck To: Yicong Yang Cc: gregkh@linuxfoundation.org, jdelvare@suse.com, giometti@enneenne.com, abbotti@mev.co.uk, hsweeten@visionengravers.com, kw@linux.com, helgaas@kernel.org, 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 Subject: Re: [PATCH v2 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag Message-ID: <20210209150658.GA31002@roeck-us.net> References: <1612868899-9185-1-git-send-email-yangyicong@hisilicon.com> <1612868899-9185-3-git-send-email-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1612868899-9185-3-git-send-email-yangyicong@hisilicon.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 09, 2021 at 07:08:17PM +0800, Yicong Yang wrote: > 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. > The above paragraph doesn't add clarity and may as well be dropped. On the other side, the commit message still doesn't mention that pr_debug depends on DEBUG, which I am sure many people don't know or remember. This is the prime reason why this patch is acceptable, so it most definitely needs to be mentioned here. Guenter > 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 >