Skip to content

Commit 87e917a

Browse files
ulfalizerioannisg
authored andcommitted
kconfig: Remove redundant 'default n' and 'prompt' properties
Bool symbols implicitly default to 'n'. A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you want to override a 'default y' on the base definition of the symbol. It isn't used like that on any of these symbols though. Also replace some config prompt "foo" bool/int with the more common shorthand config bool/int "foo" See the 'Style recommendations and shorthands' section in https://docs.zephyrproject.org/latest/guides/kconfig/index.html. Signed-off-by: Ulf Magnusson <[email protected]>
1 parent 75adf69 commit 87e917a

File tree

20 files changed

+14
-52
lines changed

20 files changed

+14
-52
lines changed

arch/arc/Kconfig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ config ARC_FIRQ
117117
config ARC_FIRQ_STACK
118118
bool "Enable separate firq stack"
119119
depends on ARC_FIRQ && RGF_NUM_BANKS > 1
120-
default n
121120
help
122121
Use separate stack for FIRQ handing. When the fast irq is also a direct
123122
irq, this will get the minimal interrupt latency.
@@ -167,7 +166,6 @@ config ARC_STACK_PROTECTION
167166

168167
config ARC_USE_UNALIGNED_MEM_ACCESS
169168
bool "Enable unaligned access in HW"
170-
default n if CPU_ARCEM
171169
default y if CPU_ARCHS
172170
depends on (CPU_ARCEM && !ARC_HAS_SECURE) || CPU_ARCHS
173171
help
@@ -235,8 +233,7 @@ config SJLI_TABLE_SIZE
235233
sjli instruction.
236234

237235
config ARC_SECURE_FIRMWARE
238-
prompt "Generate Secure Firmware"
239-
bool
236+
bool "Generate Secure Firmware"
240237
depends on ARC_HAS_SECURE
241238
default y if TRUSTED_EXECUTION_SECURE
242239
help
@@ -252,8 +249,7 @@ config ARC_SECURE_FIRMWARE
252249
and normal resources of the ARC processors.
253250

254251
config ARC_NORMAL_FIRMWARE
255-
prompt "Generate Normal Firmware"
256-
bool
252+
bool "Generate Normal Firmware"
257253
depends on !ARC_SECURE_FIRMWARE
258254
depends on ARC_HAS_SECURE
259255
default y if TRUSTED_EXECUTION_NONSECURE

arch/x86/Kconfig

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ config CPU_APOLLO_LAKE
4141
#
4242

4343
config X86_64
44-
bool
45-
prompt "Run in 64-bit mode"
46-
default n
44+
bool "Run in 64-bit mode"
4745
select 64BIT
4846
select USE_SWITCH
4947
select USE_SWITCH_SUPPORTED
@@ -85,7 +83,6 @@ endchoice
8583

8684
config ACPI
8785
bool "ACPI (Advanced Configuration and Power Interface) support"
88-
default n
8986
help
9087
Allow retrieval of platform configuration at runtime.
9188

@@ -110,7 +107,6 @@ if MULTIBOOT
110107

111108
config MULTIBOOT_INFO
112109
bool "Preserve multiboot information structure"
113-
default n
114110
help
115111
Multiboot passes a pointer to an information structure to the
116112
kernel entry point. Some drivers (e.g., the multiboot framebuffer
@@ -119,14 +115,12 @@ config MULTIBOOT_INFO
119115

120116
config MULTIBOOT_MEMMAP
121117
bool "Use multiboot memory map if provided"
122-
default n
123118
select MULTIBOOT_INFO
124119
help
125120
Use the multiboot memory map if the loader provides one.
126121

127122
config MULTIBOOT_FRAMEBUF
128123
bool "Multiboot framebuffer support"
129-
default n
130124
select DISPLAY
131125
select FRAMEBUF_DISPLAY
132126
select MULTIBOOT_INFO

drivers/display/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ source "drivers/display/Kconfig.dummy"
2727
config FRAMEBUF_DISPLAY
2828
# Hidden, selected by client drivers.
2929
bool
30-
default n
3130
help
3231
Enable framebuffer-based display 'helper' driver.
3332

drivers/ethernet/Kconfig.liteeth

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ config ETH_LITEETH_0_IRQ_PRI
2020
config ETH_LITEETH_0_RANDOM_MAC
2121
bool "Random MAC address"
2222
depends on ENTROPY_GENERATOR
23-
default n
2423
help
2524
Generate a random MAC address dynamically.
2625

drivers/flash/Kconfig.simulator

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0
55

66
menuconfig FLASH_SIMULATOR
7-
bool
8-
prompt "Flash simulator"
7+
bool "Flash simulator"
98
select STATS
109
select STATS_NAMES
1110
select FLASH_HAS_PAGE_LAYOUT
@@ -16,32 +15,27 @@ menuconfig FLASH_SIMULATOR
1615
if FLASH_SIMULATOR
1716

1817
config FLASH_SIMULATOR_UNALIGNED_READ
19-
bool
20-
prompt "Allow read access to be unaligned"
18+
bool "Allow read access to be unaligned"
2119
default y
2220
help
2321
If selected, the reading operation does not check if access is aligned.
2422
Disable this option only if you want to simulate
2523
a specific FLASH interface that requires aligned read access.
2624

2725
config FLASH_SIMULATOR_DOUBLE_WRITES
28-
bool
29-
prompt "Allow program units to be programmed more than once"
30-
default n
26+
bool "Allow program units to be programmed more than once"
3127
help
3228
If selected, writing to a non-erased program unit will succeed, otherwise, it will return an error.
3329
Keep in mind that write operations can only pull bits to zero, regardless.
3430

3531
config FLASH_SIMULATOR_ERASE_PROTECT
36-
bool
37-
prompt "Enable erase protection on write protection"
32+
bool "Enable erase protection on write protection"
3833
default y
3934
help
4035
If selected, turning on write protection will also prevent erasing.
4136

4237
config FLASH_SIMULATOR_SIMULATE_TIMING
43-
bool
44-
prompt "Enable hardware timing simulation"
38+
bool "Enable hardware timing simulation"
4539

4640
config FLASH_SIMULATOR_STAT_PAGE_COUNT
4741
int "Pages under statistic"
@@ -59,20 +53,17 @@ config FLASH_SIMULATOR_STAT_PAGE_COUNT
5953
if FLASH_SIMULATOR_SIMULATE_TIMING
6054

6155
config FLASH_SIMULATOR_MIN_READ_TIME_US
62-
int
63-
prompt "Minimum read time (µS)"
56+
int "Minimum read time (µS)"
6457
default 2
6558
range 1 1000000
6659

6760
config FLASH_SIMULATOR_MIN_WRITE_TIME_US
68-
int
69-
prompt "Minimum write time (µS)"
61+
int "Minimum write time (µS)"
7062
default 100
7163
range 1 1000000
7264

7365
config FLASH_SIMULATOR_MIN_ERASE_TIME_US
74-
int
75-
prompt "Minimum erase time (µS)"
66+
int "Minimum erase time (µS)"
7667
default 2000
7768
range 1 1000000
7869

drivers/interrupt_controller/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ menuconfig LOAPIC
1010
depends on X86
1111
help
1212
This option selects local APIC as the interrupt controller.
13+
1314
if LOAPIC
15+
1416
config LOAPIC_BASE_ADDRESS
1517
hex "Local APIC Base Address"
1618
default 0xFEE00000
@@ -19,7 +21,6 @@ config LOAPIC_BASE_ADDRESS
1921

2022
config X2APIC
2123
bool "Access local APIC in x2APIC mode"
22-
default n
2324
help
2425
If your local APIC supports x2APIC mode, turn this on.
2526

drivers/pcie/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ if PCIE
1313

1414
config PCIE_MSI
1515
bool "Enable support for PCI(e) MSI"
16-
default n
1716
help
1817
Use Message-Signaled Interrupts where possible. With this option
1918
enabled, PCI(e) devices which support MSI will be configured (at
@@ -22,7 +21,6 @@ config PCIE_MSI
2221

2322
config PCIE_SHELL
2423
bool "Enable PCIe/new PCI Shell"
25-
default n
2624
depends on SHELL
2725
help
2826
Enable commands for debugging PCI(e) using the built-in shell.

drivers/serial/Kconfig.ns16550

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ config UART_NS16750
3434

3535
config UART_NS16550_ACCESS_WORD_ONLY
3636
bool "NS16550 only allows word access"
37-
default n
3837
depends on UART_NS16550
3938
help
4039
In some case, e.g. ARC HS Development kit, the peripheral space of ns

drivers/spi/Kconfig.dw

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ config SPI_DW_FIFO_DEPTH
3434

3535
config SPI_DW_ACCESS_WORD_ONLY
3636
bool "DesignWare SPI only allows word access"
37-
default n
3837
depends on SPI_DW
3938
help
4039
In some case, e.g. ARC HS Development kit, the peripheral space of

drivers/timer/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ config APIC_TIMER_IRQ_PRIORITY
3333

3434
config APIC_TIMER_TSC
3535
bool "Use invariant TSC for z_timer_cycle_get_32()"
36-
default n
3736
help
3837
If your CPU supports invariant TSC, and you know the ratio of the
3938
TSC frequency to CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC (the local APIC

0 commit comments

Comments
 (0)