mm: remove redundant 'default n' from Kconfig-s
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tue, 14 May 2019 00:21:53 +0000 (17:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 May 2019 16:47:50 +0000 (09:47 -0700)
'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.
    ...

Link: http://lkml.kernel.org/r/c3385916-e4d4-37d3-b330-e6b7dff83a52@samsung.com
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/Kconfig
mm/Kconfig.debug

index 0eada3f818faacd2437e0c7720920da33d833784..4c2e6b63c06442b84d18766f870f7bcf511b197b 100644 (file)
@@ -161,7 +161,6 @@ config MEMORY_HOTPLUG_SPARSE
 
 config MEMORY_HOTPLUG_DEFAULT_ONLINE
         bool "Online the newly added memory blocks by default"
-        default n
         depends on MEMORY_HOTPLUG
         help
          This option sets the default policy setting for memory hotplug
@@ -439,7 +438,6 @@ config NEED_PER_CPU_KM
 
 config CLEANCACHE
        bool "Enable cleancache driver to cache clean pages if tmem is present"
-       default n
        help
          Cleancache can be thought of as a page-granularity victim cache
          for clean pages that the kernel's pageframe replacement algorithm
@@ -463,7 +461,6 @@ config CLEANCACHE
 config FRONTSWAP
        bool "Enable frontswap to cache swap pages if tmem is present"
        depends on SWAP
-       default n
        help
          Frontswap is so named because it can be thought of as the opposite
          of a "backing" store for a swap device.  The data is stored into
@@ -535,7 +532,6 @@ config ZSWAP
        depends on FRONTSWAP && CRYPTO=y
        select CRYPTO_LZO
        select ZPOOL
-       default n
        help
          A lightweight compressed cache for swap pages.  It takes
          pages that are in the process of being swapped out and attempts to
@@ -552,14 +548,12 @@ config ZSWAP
 
 config ZPOOL
        tristate "Common API for compressed memory storage"
-       default n
        help
          Compressed memory storage API.  This allows using either zbud or
          zsmalloc.
 
 config ZBUD
        tristate "Low (Up to 2x) density storage for compressed pages"
-       default n
        help
          A special purpose allocator for storing compressed pages.
          It is designed to store up to two compressed pages per physical
@@ -570,7 +564,6 @@ config ZBUD
 config Z3FOLD
        tristate "Up to 3x density storage for compressed pages"
        depends on ZPOOL
-       default n
        help
          A special purpose allocator for storing compressed pages.
          It is designed to store up to three compressed pages per physical
@@ -580,7 +573,6 @@ config Z3FOLD
 config ZSMALLOC
        tristate "Memory allocator for compressed pages"
        depends on MMU
-       default n
        help
          zsmalloc is a slab-based memory allocator designed to store
          compressed RAM pages.  zsmalloc uses virtual memory mapping
@@ -631,7 +623,6 @@ config MAX_STACK_SIZE_MB
 
 config DEFERRED_STRUCT_PAGE_INIT
        bool "Defer initialisation of struct pages to kthreads"
-       default n
        depends on SPARSEMEM
        depends on !NEED_PER_CPU_KM
        depends on 64BIT
@@ -743,7 +734,6 @@ config ARCH_HAS_PKEYS
 
 config PERCPU_STATS
        bool "Collect percpu memory statistics"
-       default n
        help
          This feature collects and exposes statistics via debugfs. The
          information includes global and per chunk statistics, which can
@@ -751,7 +741,6 @@ config PERCPU_STATS
 
 config GUP_BENCHMARK
        bool "Enable infrastructure for get_user_pages_fast() benchmarking"
-       default n
        help
          Provides /sys/kernel/debug/gup_benchmark that helps with testing
          performance of get_user_pages_fast().
index e3df921208c0d81edd6d9a981ffc010bc4eea072..e980ceb775a44a59b8d285ef28df5fb61f69b8e6 100644 (file)
@@ -33,7 +33,6 @@ config DEBUG_PAGEALLOC
 
 config DEBUG_PAGEALLOC_ENABLE_DEFAULT
        bool "Enable debug page memory allocations by default?"
-       default n
        depends on DEBUG_PAGEALLOC
        ---help---
          Enable debug page memory allocations by default? This value