linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: pcie: remove redundant 'default n' from Kconfig
       [not found] <CGME20181016143814eucas1p21b1f3099131fc3f4263947932195299e@eucas1p2.samsung.com>
@ 2018-10-16 14:38 ` Bartlomiej Zolnierkiewicz
  2018-10-18 19:09   ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-10-16 14:38 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel

'default n' is the default value for any bool or tristate Kconfig
setting so there is no need to write it explicitly.

Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO
is not set' for visible symbols") the Kconfig behavior is the same
regardless of 'default n' being present or not:

    ...
    One side effect of (and the main motivation for) this change is making
    the following two definitions behave exactly the same:
    
        config FOO
                bool
    
        config FOO
                bool
                default n
    
    With this change, neither of these will generate a
    '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied).
    That might make it clearer to people that a bare 'default n' is
    redundant.
    ...

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/pci/pcie/Kconfig |    4 ----
 1 file changed, 4 deletions(-)

Index: b/drivers/pci/pcie/Kconfig
===================================================================
--- a/drivers/pci/pcie/Kconfig	2018-10-09 15:58:49.831123212 +0200
+++ b/drivers/pci/pcie/Kconfig	2018-10-16 16:36:32.419732670 +0200
@@ -36,7 +36,6 @@ config PCIEAER
 config PCIEAER_INJECT
 	tristate "PCI Express error injection support"
 	depends on PCIEAER && DYNAMIC_FTRACE_WITH_REGS
-	default n
 	help
 	  This enables PCI Express Root Port Advanced Error Reporting
 	  (AER) software error injector.
@@ -84,7 +83,6 @@ config PCIEASPM
 config PCIEASPM_DEBUG
 	bool "Debug PCI Express ASPM"
 	depends on PCIEASPM
-	default n
 	help
 	  This enables PCI Express ASPM debug support. It will add per-device
 	  interface to control ASPM.
@@ -129,7 +127,6 @@ config PCIE_PME
 config PCIE_DPC
 	bool "PCI Express Downstream Port Containment support"
 	depends on PCIEPORTBUS && PCIEAER
-	default n
 	help
 	  This enables PCI Express Downstream Port Containment (DPC)
 	  driver support.  DPC events from Root and Downstream ports
@@ -139,7 +136,6 @@ config PCIE_DPC
 
 config PCIE_PTM
 	bool "PCI Express Precision Time Measurement support"
-	default n
 	depends on PCIEPORTBUS
 	help
 	  This enables PCI Express Precision Time Measurement (PTM)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: pcie: remove redundant 'default n' from Kconfig
  2018-10-16 14:38 ` [PATCH] PCI: pcie: remove redundant 'default n' from Kconfig Bartlomiej Zolnierkiewicz
@ 2018-10-18 19:09   ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2018-10-18 19:09 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Bjorn Helgaas, linux-pci, linux-kernel

On Tue, Oct 16, 2018 at 04:38:13PM +0200, Bartlomiej Zolnierkiewicz wrote:
> 'default n' is the default value for any bool or tristate Kconfig
> setting so there is no need to write it explicitly.
> 
> Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO
> is not set' for visible symbols") the Kconfig behavior is the same
> regardless of 'default n' being present or not:
> 
>     ...
>     One side effect of (and the main motivation for) this change is making
>     the following two definitions behave exactly the same:
>     
>         config FOO
>                 bool
>     
>         config FOO
>                 bool
>                 default n
>     
>     With this change, neither of these will generate a
>     '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied).
>     That might make it clearer to people that a bare 'default n' is
>     redundant.
>     ...
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Applied to pci/misc for v4.20, thanks!

> ---
>  drivers/pci/pcie/Kconfig |    4 ----
>  1 file changed, 4 deletions(-)
> 
> Index: b/drivers/pci/pcie/Kconfig
> ===================================================================
> --- a/drivers/pci/pcie/Kconfig	2018-10-09 15:58:49.831123212 +0200
> +++ b/drivers/pci/pcie/Kconfig	2018-10-16 16:36:32.419732670 +0200
> @@ -36,7 +36,6 @@ config PCIEAER
>  config PCIEAER_INJECT
>  	tristate "PCI Express error injection support"
>  	depends on PCIEAER && DYNAMIC_FTRACE_WITH_REGS
> -	default n
>  	help
>  	  This enables PCI Express Root Port Advanced Error Reporting
>  	  (AER) software error injector.
> @@ -84,7 +83,6 @@ config PCIEASPM
>  config PCIEASPM_DEBUG
>  	bool "Debug PCI Express ASPM"
>  	depends on PCIEASPM
> -	default n
>  	help
>  	  This enables PCI Express ASPM debug support. It will add per-device
>  	  interface to control ASPM.
> @@ -129,7 +127,6 @@ config PCIE_PME
>  config PCIE_DPC
>  	bool "PCI Express Downstream Port Containment support"
>  	depends on PCIEPORTBUS && PCIEAER
> -	default n
>  	help
>  	  This enables PCI Express Downstream Port Containment (DPC)
>  	  driver support.  DPC events from Root and Downstream ports
> @@ -139,7 +136,6 @@ config PCIE_DPC
>  
>  config PCIE_PTM
>  	bool "PCI Express Precision Time Measurement support"
> -	default n
>  	depends on PCIEPORTBUS
>  	help
>  	  This enables PCI Express Precision Time Measurement (PTM)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-18 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20181016143814eucas1p21b1f3099131fc3f4263947932195299e@eucas1p2.samsung.com>
2018-10-16 14:38 ` [PATCH] PCI: pcie: remove redundant 'default n' from Kconfig Bartlomiej Zolnierkiewicz
2018-10-18 19:09   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).