* [PATCH] nios2: remove redundant 'default n' from Kconfig-s
[not found] <CGME20181010150055eucas1p1b50d2fa2333e2b0b84f90c14fb06111b@eucas1p1.samsung.com>
@ 2018-10-10 15:00 ` Bartlomiej Zolnierkiewicz
2018-11-09 8:14 ` Ley Foon Tan
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-10-10 15:00 UTC (permalink / raw)
To: Ley Foon Tan; +Cc: nios2-dev, 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>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nios2: remove redundant 'default n' from Kconfig-s
2018-10-10 15:00 ` [PATCH] nios2: remove redundant 'default n' from Kconfig-s Bartlomiej Zolnierkiewicz
@ 2018-11-09 8:14 ` Ley Foon Tan
0 siblings, 0 replies; 2+ messages in thread
From: Ley Foon Tan @ 2018-11-09 8:14 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: nios2-dev, linux-kernel
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@samsung.com>
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
> ---
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-09 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20181010150055eucas1p1b50d2fa2333e2b0b84f90c14fb06111b@eucas1p1.samsung.com>
2018-10-10 15:00 ` [PATCH] nios2: remove redundant 'default n' from Kconfig-s Bartlomiej Zolnierkiewicz
2018-11-09 8:14 ` Ley Foon Tan
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).