linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/block: remove redundant 'default n' from Kconfig-s
       [not found] <CGME20181009144103eucas1p1dbf48b04c923877cdbdcf2197725ccd1@eucas1p1.samsung.com>
@ 2018-10-09 14:41 ` Bartlomiej Zolnierkiewicz
  2018-10-10 20:12   ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-10-09 14:41 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Philipp Reisner, Lars Ellenberg, drbd-dev, Minchan Kim,
	Nitin Gupta, Sergey Senozhatsky, linux-block, 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/block/Kconfig      |    1 -
 drivers/block/drbd/Kconfig |    1 -
 drivers/block/zram/Kconfig |    2 --
 3 files changed, 4 deletions(-)

Index: b/drivers/block/Kconfig
===================================================================
--- a/drivers/block/Kconfig	2018-09-26 15:54:31.958819766 +0200
+++ b/drivers/block/Kconfig	2018-10-09 16:35:01.327177898 +0200
@@ -461,7 +461,6 @@ config BLK_DEV_RBD
 	select LIBCRC32C
 	select CRYPTO_AES
 	select CRYPTO
-	default n
 	help
 	  Say Y here if you want include the Rados block device, which stripes
 	  a block device over objects stored in the Ceph distributed object
Index: b/drivers/block/drbd/Kconfig
===================================================================
--- a/drivers/block/drbd/Kconfig	2018-09-03 18:11:21.973792264 +0200
+++ b/drivers/block/drbd/Kconfig	2018-10-09 16:35:10.251178122 +0200
@@ -11,7 +11,6 @@ config BLK_DEV_DRBD
 	depends on PROC_FS && INET
 	select LRU_CACHE
 	select LIBCRC32C
-	default n
 	help
 
 	  NOTE: In order to authenticate connections you have to select
Index: b/drivers/block/zram/Kconfig
===================================================================
--- a/drivers/block/zram/Kconfig	2018-09-03 18:11:22.185792260 +0200
+++ b/drivers/block/zram/Kconfig	2018-10-09 16:35:21.667178410 +0200
@@ -3,7 +3,6 @@ config ZRAM
 	tristate "Compressed RAM block device support"
 	depends on BLOCK && SYSFS && ZSMALLOC && CRYPTO
 	select CRYPTO_LZO
-	default n
 	help
 	  Creates virtual block devices called /dev/zramX (X = 0, 1, ...).
 	  Pages written to these disks are compressed and stored in memory
@@ -18,7 +17,6 @@ config ZRAM
 config ZRAM_WRITEBACK
        bool "Write back incompressible page to backing device"
        depends on ZRAM
-       default n
        help
 	 With incompressible page, there is no memory saving to keep it
 	 in memory. Instead, write it out to backing device.

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

* Re: [PATCH] drivers/block: remove redundant 'default n' from Kconfig-s
  2018-10-09 14:41 ` [PATCH] drivers/block: remove redundant 'default n' from Kconfig-s Bartlomiej Zolnierkiewicz
@ 2018-10-10 20:12   ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-10-10 20:12 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Philipp Reisner, Lars Ellenberg, drbd-dev, Minchan Kim,
	Nitin Gupta, Sergey Senozhatsky, linux-block, linux-kernel

On 10/9/18 8:41 AM, 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.
>     ...

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2018-10-10 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20181009144103eucas1p1dbf48b04c923877cdbdcf2197725ccd1@eucas1p1.samsung.com>
2018-10-09 14:41 ` [PATCH] drivers/block: remove redundant 'default n' from Kconfig-s Bartlomiej Zolnierkiewicz
2018-10-10 20:12   ` Jens Axboe

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).