Re: [PATCH] nios2: remove redundant 'default n' from Kconfig-s

From: Ley Foon Tan
Date: Fri Nov 09 2018 - 03:18:13 EST


On Wed, 2018-10-10 at 17:00 +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@xxxxxxxxxxx>
Acked-by: Ley Foon Tan <ley.foon.tan@xxxxxxxxx>
> ---
> Âarch/nios2/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂÂ1 -
> Âarch/nios2/platform/Kconfig.platform |ÂÂÂÂ9 ---------
> Â2 files changed, 10 deletions(-)
>
> Index: b/arch/nios2/Kconfig
> ===================================================================
> --- a/arch/nios2/KconfigÂÂÂÂÂÂÂÂ2018-10-09 15:58:36.543122877 +0200
> +++ b/arch/nios2/KconfigÂÂÂÂÂÂÂÂ2018-10-10 16:57:50.411927641 +0200
> @@ -126,7 +126,6 @@ config NIOS2_CMDLINE_IGNORE_DTB
>
> Âconfig NIOS2_PASS_CMDLINE
> ÂÂÂÂÂÂÂÂbool "Passed kernel command line from u-boot"
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂUse bootargs env variable from u-boot for kernel command
> line.
> ÂÂÂÂÂÂÂÂÂÂwill override "Default kernel command string".
> Index: b/arch/nios2/platform/Kconfig.platform
> ===================================================================
> --- a/arch/nios2/platform/Kconfig.platformÂÂÂÂÂÂ2018-09-03
> 18:11:12.057792442 +0200
> +++ b/arch/nios2/platform/Kconfig.platformÂÂÂÂÂÂ2018-10-10
> 16:58:37.951928838 +0200
> @@ -17,7 +17,6 @@ comment "Device tree"
>
> Âconfig NIOS2_DTB_AT_PHYS_ADDR
> ÂÂÂÂÂÂÂÂbool "DTB at physical address"
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂWhen enabled you can select a physical address to load the
> dtb from.
> ÂÂÂÂÂÂÂÂÂÂNormally this address is passed by a bootloader such as u-
> boot but
> @@ -37,7 +36,6 @@ config NIOS2_DTB_PHYS_ADDR
>
> Âconfig NIOS2_DTB_SOURCE_BOOL
> ÂÂÂÂÂÂÂÂbool "Compile and link device tree into kernel image"
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂThis allows you to specify a dts (device tree source) file
> ÂÂÂÂÂÂÂÂÂÂwhich will be compiled and linked into the kernel image.
> @@ -62,21 +60,18 @@ config NIOS2_ARCH_REVISION
>
> Âconfig NIOS2_HW_MUL_SUPPORT
> ÂÂÂÂÂÂÂÂbool "Enable MUL instruction"
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂSet to true if you configured the Nios II to include the
> MUL
> ÂÂÂÂÂÂÂÂÂÂinstruction.ÂÂThis will enable the -mhw-mul compiler flag.
>
> Âconfig NIOS2_HW_MULX_SUPPORT
> ÂÂÂÂÂÂÂÂbool "Enable MULX instruction"
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂSet to true if you configured the Nios II to include the
> MULX
> ÂÂÂÂÂÂÂÂÂÂinstruction.ÂÂEnables the -mhw-mulx compiler flag.
>
> Âconfig NIOS2_HW_DIV_SUPPORT
> ÂÂÂÂÂÂÂÂbool "Enable DIV instruction"
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂSet to true if you configured the Nios II to include the
> DIV
> ÂÂÂÂÂÂÂÂÂÂinstruction.ÂÂEnables the -mhw-div compiler flag.
> @@ -84,7 +79,6 @@ config NIOS2_HW_DIV_SUPPORT
> Âconfig NIOS2_BMX_SUPPORT
> ÂÂÂÂÂÂÂÂbool "Enable BMX instructions"
> ÂÂÂÂÂÂÂÂdepends on NIOS2_ARCH_REVISION = 2
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂSet to true if you configured the Nios II R2 to include
> ÂÂÂÂÂÂÂÂÂÂthe BMX Bit Manipulation Extension instructions. Enables
> @@ -93,7 +87,6 @@ config NIOS2_BMX_SUPPORT
> Âconfig NIOS2_CDX_SUPPORT
> ÂÂÂÂÂÂÂÂbool "Enable CDX instructions"
> ÂÂÂÂÂÂÂÂdepends on NIOS2_ARCH_REVISION = 2
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂSet to true if you configured the Nios II R2 to include
> ÂÂÂÂÂÂÂÂÂÂthe CDX Bit Manipulation Extension instructions. Enables
> @@ -101,13 +94,11 @@ config NIOS2_CDX_SUPPORT
>
> Âconfig NIOS2_FPU_SUPPORT
> ÂÂÂÂÂÂÂÂbool "Custom floating point instr support"
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂEnables the -mcustom-fpu-cfg=60-1 compiler flag.
>
> Âconfig NIOS2_CI_SWAB_SUPPORT
> ÂÂÂÂÂÂÂÂbool "Byteswap custom instruction"
> -ÂÂÂÂÂÂÂdefault n
> ÂÂÂÂÂÂÂÂhelp
> ÂÂÂÂÂÂÂÂÂÂUse the byteswap (endian converter) Nios II custom
> instruction provided
> ÂÂÂÂÂÂÂÂÂÂby Altera and which can be enabled in QSYS builder. This
> accelerates
>
> ________________________________
>
> Confidentiality Notice.
> This message may contain information that is confidential or
> otherwise protected from disclosure. If you are not the intended
> recipient, you are hereby notified that any use, disclosure,
> dissemination, distribution, or copying of this message, or any
> attachments, is strictly prohibited. If you have received this
> message in error, please advise the sender by reply e-mail, and
> delete the message and any attachments. Thank you.