All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: remove redundant 'default n' from Kconfig
       [not found] <CGME20181010145127eucas1p2fcd5b5f91fa3ac7f763a51c0d5e8b3cb@eucas1p2.samsung.com>
@ 2018-10-10 14:51 ` Bartlomiej Zolnierkiewicz
  2018-10-11  5:48   ` Lee Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-10-10 14:51 UTC (permalink / raw)
  To: Lee Jones; +Cc: LKML

'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/mfd/Kconfig |    6 ------
 1 file changed, 6 deletions(-)

Index: b/drivers/mfd/Kconfig
===================================================================
--- a/drivers/mfd/Kconfig	2018-10-09 15:58:40.547122978 +0200
+++ b/drivers/mfd/Kconfig	2018-10-10 16:49:37.575915230 +0200
@@ -8,7 +8,6 @@ menu "Multifunction device drivers"
 config MFD_CORE
 	tristate
 	select IRQ_DOMAIN
-	default n
 
 config MFD_CS5535
 	tristate "AMD CS5535 and CS5536 southbridge core functions"
@@ -870,7 +869,6 @@ config MFD_VIPERBOARD
         tristate "Nano River Technologies Viperboard"
 	select MFD_CORE
 	depends on USB
-	default n
 	help
 	  Say yes here if you want support for Nano River Technologies
 	  Viperboard.
@@ -1575,7 +1573,6 @@ config MFD_TWL4030_AUDIO
 	bool "TI TWL4030 Audio"
 	depends on TWL4030_CORE
 	select MFD_CORE
-	default n
 
 config TWL6040_CORE
 	bool "TI TWL6040 audio codec"
@@ -1583,7 +1580,6 @@ config TWL6040_CORE
 	select MFD_CORE
 	select REGMAP_I2C
 	select REGMAP_IRQ
-	default n
 	help
 	  Say yes here if you want support for Texas Instruments TWL6040 audio
 	  codec.
@@ -1605,7 +1601,6 @@ config MFD_WL1273_CORE
 	tristate "TI WL1273 FM radio"
 	depends on I2C
 	select MFD_CORE
-	default n
 	help
 	  This is the core driver for the TI WL1273 FM radio. This MFD
 	  driver connects the radio-wl1273 V4L2 module and the wl1273
@@ -1649,7 +1644,6 @@ config MFD_TC3589X
 
 config MFD_TMIO
 	bool
-	default n
 
 config MFD_T7L66XB
 	bool "Toshiba T7L66XB"

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

* Re: [PATCH] mfd: remove redundant 'default n' from Kconfig
  2018-10-10 14:51 ` [PATCH] mfd: remove redundant 'default n' from Kconfig Bartlomiej Zolnierkiewicz
@ 2018-10-11  5:48   ` Lee Jones
  2018-10-12 12:08     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2018-10-11  5:48 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: LKML

On Wed, 10 Oct 2018, 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>
> ---
>  drivers/mfd/Kconfig |    6 ------
>  1 file changed, 6 deletions(-)

The change looks okay to me, but I would also like you to include the
Maintainers/Reviewers for the affected source files.

Also, I assume you are not just submitting these changes to the MFD
subsystem.  My suggesting is to change each subsystem per patch (as
you have done here), and submit them in one patch-set with each of the
subsystem Maintainers included, so each of us has some visibility into
how the general idea is being received.

> Index: b/drivers/mfd/Kconfig
> ===================================================================
> --- a/drivers/mfd/Kconfig	2018-10-09 15:58:40.547122978 +0200
> +++ b/drivers/mfd/Kconfig	2018-10-10 16:49:37.575915230 +0200
> @@ -8,7 +8,6 @@ menu "Multifunction device drivers"
>  config MFD_CORE
>  	tristate
>  	select IRQ_DOMAIN
> -	default n
>  
>  config MFD_CS5535
>  	tristate "AMD CS5535 and CS5536 southbridge core functions"
> @@ -870,7 +869,6 @@ config MFD_VIPERBOARD
>          tristate "Nano River Technologies Viperboard"
>  	select MFD_CORE
>  	depends on USB
> -	default n
>  	help
>  	  Say yes here if you want support for Nano River Technologies
>  	  Viperboard.
> @@ -1575,7 +1573,6 @@ config MFD_TWL4030_AUDIO
>  	bool "TI TWL4030 Audio"
>  	depends on TWL4030_CORE
>  	select MFD_CORE
> -	default n
>  
>  config TWL6040_CORE
>  	bool "TI TWL6040 audio codec"
> @@ -1583,7 +1580,6 @@ config TWL6040_CORE
>  	select MFD_CORE
>  	select REGMAP_I2C
>  	select REGMAP_IRQ
> -	default n
>  	help
>  	  Say yes here if you want support for Texas Instruments TWL6040 audio
>  	  codec.
> @@ -1605,7 +1601,6 @@ config MFD_WL1273_CORE
>  	tristate "TI WL1273 FM radio"
>  	depends on I2C
>  	select MFD_CORE
> -	default n
>  	help
>  	  This is the core driver for the TI WL1273 FM radio. This MFD
>  	  driver connects the radio-wl1273 V4L2 module and the wl1273
> @@ -1649,7 +1644,6 @@ config MFD_TC3589X
>  
>  config MFD_TMIO
>  	bool
> -	default n
>  
>  config MFD_T7L66XB
>  	bool "Toshiba T7L66XB"

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: remove redundant 'default n' from Kconfig
  2018-10-11  5:48   ` Lee Jones
@ 2018-10-12 12:08     ` Bartlomiej Zolnierkiewicz
  2018-10-25  6:57       ` Lee Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-10-12 12:08 UTC (permalink / raw)
  To: Lee Jones; +Cc: LKML


On 10/11/2018 07:48 AM, Lee Jones wrote:
> On Wed, 10 Oct 2018, 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>
>> ---
>>  drivers/mfd/Kconfig |    6 ------
>>  1 file changed, 6 deletions(-)
> 
> The change looks okay to me, but I would also like you to include the
> Maintainers/Reviewers for the affected source files.

Could you please explain in more details what do you mean?

The only affected source file is drivers/mfd/Kconfig:

$ ./scripts/get_maintainer.pl -f drivers/mfd/Kconfig 
Lee Jones <lee.jones@linaro.org> (supporter:MULTIFUNCTION DEVICES (MFD))
linux-kernel@vger.kernel.org (open list)

> Also, I assume you are not just submitting these changes to the MFD
> subsystem.  My suggesting is to change each subsystem per patch (as
> you have done here), and submit them in one patch-set with each of the
> subsystem Maintainers included, so each of us has some visibility into
> how the general idea is being received.

The general idea is trivial - remove redundant "default n" from Kconfig
files and as a result cut ~700 LOC kernel wide. I assume that this is so
trivial change that there is no need for longer deliberations.

Also I'm sorry but I simply cannot invest few days straight in preparing
the full patchset. OTOH investing few minutes a day or a week is fine so
this is why I'm doing this change incrementally.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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

* Re: [PATCH] mfd: remove redundant 'default n' from Kconfig
  2018-10-12 12:08     ` Bartlomiej Zolnierkiewicz
@ 2018-10-25  6:57       ` Lee Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2018-10-25  6:57 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: LKML

On Fri, 12 Oct 2018, Bartlomiej Zolnierkiewicz wrote:
> On 10/11/2018 07:48 AM, Lee Jones wrote:
> > On Wed, 10 Oct 2018, 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>
> >> ---
> >>  drivers/mfd/Kconfig |    6 ------
> >>  1 file changed, 6 deletions(-)
> > 
> > The change looks okay to me, but I would also like you to include the
> > Maintainers/Reviewers for the affected source files.
> 
> Could you please explain in more details what do you mean?
> 
> The only affected source file is drivers/mfd/Kconfig:
> 
> $ ./scripts/get_maintainer.pl -f drivers/mfd/Kconfig 
> Lee Jones <lee.jones@linaro.org> (supporter:MULTIFUNCTION DEVICES (MFD))
> linux-kernel@vger.kernel.org (open list)

You need to run get_maintainer.pl on each of the source files this
patch affects.

> > Also, I assume you are not just submitting these changes to the MFD
> > subsystem.  My suggesting is to change each subsystem per patch (as
> > you have done here), and submit them in one patch-set with each of the
> > subsystem Maintainers included, so each of us has some visibility into
> > how the general idea is being received.
> 
> The general idea is trivial - remove redundant "default n" from Kconfig
> files and as a result cut ~700 LOC kernel wide. I assume that this is so
> trivial change that there is no need for longer deliberations.

I agree that the patch looks fairly inert.

> Also I'm sorry but I simply cannot invest few days straight in preparing
> the full patchset. OTOH investing few minutes a day or a week is fine so
> this is why I'm doing this change incrementally.

However, converting a few subsystems at a time doesn't sound like a
great hardship.  It allows other Maintainers to see how the idea is
being received generally - rather than doing them all independently
which disallows shared interest/discussion.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2018-10-25  6:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20181010145127eucas1p2fcd5b5f91fa3ac7f763a51c0d5e8b3cb@eucas1p2.samsung.com>
2018-10-10 14:51 ` [PATCH] mfd: remove redundant 'default n' from Kconfig Bartlomiej Zolnierkiewicz
2018-10-11  5:48   ` Lee Jones
2018-10-12 12:08     ` Bartlomiej Zolnierkiewicz
2018-10-25  6:57       ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.