Re: [PATCH] PCI: Use subdir-ccflags-* to inherit debug flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bjorn,

Thank you!  This looks great!

[...]
> commit e8e9aababe60 ("PCI: Apply CONFIG_PCI_DEBUG to entire drivers/pci hierarchy")
> Author: Junhao He <hejunhao2@xxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxx
>     Signed-off-by: Junhao He <hejunhao2@xxxxxxxxxxxxx>
>     Signed-off-by: Yicong Yang <yangyicong@xxxxxxxxxxxxx>
>     Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
>     Reviewed-by: Krzysztof Wilczyński <kw@xxxxxxxxx>
> 
> 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

And thank you again, Yicong, for fixing this.  Much appreciated.

Krzysztof



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux