Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp939264pxb; Tue, 9 Feb 2021 17:21:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0i8Nf8GidHYQj1Cl/qYX5hXYYzrNqld7VnWdXUTobxqHJ83dzNoBgtTkp0dwYk+lkBgNs X-Received: by 2002:a17:906:c9d8:: with SMTP id hk24mr510567ejb.468.1612920114820; Tue, 09 Feb 2021 17:21:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612920114; cv=none; d=google.com; s=arc-20160816; b=v4AnKNJVJ5DKmIZ4GFwfdKwN1PMKMQHBO51p7h/EdI6Rlml0BC2+0GVG4TZi31rNAm B3OOk23cxpXeCo7VpcZB7ewHJ8ymtduV0K8dOOhinTt8HvK5r/Dycox/4hQQD2zS75an vkIFJTAj0FGlnArozTG3VlxgRyNIz+CQ+HZZ7Nmq8U0bshK28Epptt/pGwEzPWhVbThr s66XiGENFtGgn4vInDeCWbkzJ9BDPfNjEmTPdyG3o3MabBOOpVa5eZGDvTtMNNBHpLaQ lth+5G32sfU6i0KnwFMWU8+3HFZnBy3SVspzyidNrOpxKKn3ZAk8hrMTCn0gO7zlZH5V yvmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=JODRESJRo5EuNqZnm3rv5NhCam017wsMxbqy4VOR7x4=; b=ViCtcd5pbazSEeRZXEjTq6JSEgBQALOltgcgSVGIMR97kkA8Bw16+SIVgZ/JKz8xVJ 0EULz4LdWByLCYYNnUHRmuhbgjblxJLUKIPFhh5F8khMuxov1D8U7wd+7v25PPe2RTIx N0oEKbJ4XhKi1xeRRjwhl9sTB0iRMrJC6dm+Nfb0x3XrX8jxk+wQTVy6PQ+plv0BmYyN bmyl/yoUpk1Sxj3FcmcUAdTiZUIVsJWs1H8pXCsPO+sDJ+2AwbXw+5YBMyyFbn6HVlFu yz6SAi+GFi1oEPDwEGZeC9iaBKEnTYTyh4ZbhJ9ZNf3JSXgBQIzpdb1gWKoat9mCeB0O UNng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oU9cIGGZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h20si199369eja.372.2021.02.09.17.21.32; Tue, 09 Feb 2021 17:21:54 -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=@kernel.org header.s=k20201202 header.b=oU9cIGGZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235104AbhBJBSO (ORCPT + 99 others); Tue, 9 Feb 2021 20:18:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:33420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234349AbhBIWq5 (ORCPT ); Tue, 9 Feb 2021 17:46:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 92F1664E8B; Tue, 9 Feb 2021 21:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612905913; bh=3l1Lx2Zsd3+a58rOtqbr6Ig2BO03fAiJHekglj/tm5I=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=oU9cIGGZ9+lvTz3ixoLQmevdhcqk5X5fN7zKiSKQ9km0FZCUZTRPHvOTCIzbD6M1W vnXE7cYSpKccas23kLuH6Wzm/8zSNH+onxHtt3UcPAj45dzkspoajXUixWJewEyJcV kOpAOQYYtuAuT/KyCLv7SWI8f46g/QkS6iar7Bg1GoH1e4n0uNJ78gI9Z7EDkafhlF N3k8hhiGuc7Rd28WV7BRooYCOpOPs7RNOIgJ2NYsuRiCMumVKv29td6rVNfiX87xdh Mp+OIUhUbzvT7WZHChGByhuK99QBjCHzvcLR4uhgnVvJH4mJZgKjwKkFD9lbErj1E4 pKVsL82XoRPBQ== Date: Tue, 9 Feb 2021 15:25:10 -0600 From: Bjorn Helgaas To: Yicong Yang Cc: linux-pci@vger.kernel.org, prime.zeng@huawei.com, linuxarm@openeuler.org, Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: Use subdir-ccflags-* to inherit debug flag Message-ID: <20210209212510.GA513360@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1612438215-33105-1-git-send-email-yangyicong@hisilicon.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc Masahiro, Michal, linux-kbuild, linux-kernel] On Thu, Feb 04, 2021 at 07:30:15PM +0800, Yicong Yang wrote: > From: Junhao He > > Use subdir-ccflags-* instead of ccflags-* to inherit the debug > settings from Kconfig when traversing subdirectories. > > Signed-off-by: Junhao He > Signed-off-by: Yicong Yang I applied this with Krzysztof's reviewed-by and the commit log below to pci/misc for v5.12, thanks! Feel free to copy or improve the commit log for use elsewhere. > --- > drivers/pci/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile > index 11cc794..d62c4ac 100644 > --- a/drivers/pci/Makefile > +++ b/drivers/pci/Makefile > @@ -36,4 +36,4 @@ obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ > obj-y += controller/ > obj-y += switch/ > > -ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG > +subdir-ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG commit e8e9aababe60 ("PCI: Apply CONFIG_PCI_DEBUG to entire drivers/pci hierarchy") Author: Junhao He Date: Thu Feb 4 19:30:15 2021 +0800 PCI: Apply CONFIG_PCI_DEBUG to entire drivers/pci hierarchy CONFIG_PCI_DEBUG=y adds -DDEBUG to CFLAGS, which enables things like pr_debug() and dev_dbg() (and hence pci_dbg()). Previously we added -DDEBUG for files in drivers/pci/, but not files in subdirectories of drivers/pci/. Add -DDEBUG to CFLAGS for all files below drivers/pci/ so CONFIG_PCI_DEBUG applies to the entire hierarchy. [bhelgaas: commit log] Link: https://lore.kernel.org/r/1612438215-33105-1-git-send-email-yangyicong@hisilicon.com Signed-off-by: Junhao He Signed-off-by: Yicong Yang Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof WilczyƄski diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 11cc79411e2d..d62c4ac4ae1b 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -36,4 +36,4 @@ obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ obj-y += controller/ obj-y += switch/ -ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG +subdir-ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG