Skip to content

Commit fd9981a

Browse files
ulfalizernashif
authored andcommitted
kconfig: Factor out HAS_FLASH_LOAD_OFFSET dependency
Use a top-level 'if' instead of three separate 'depends on'. They're exactly equivalent (top-level 'if's are just a shorthand for adding 'depends on' to each item within the 'if'). Signed-off-by: Ulf Magnusson <[email protected]>
1 parent 90b9eb3 commit fd9981a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Kconfig.zephyr

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ config HAS_FLASH_LOAD_OFFSET
8585
This option is selected by targets having a FLASH_LOAD_OFFSET
8686
and FLASH_LOAD_SIZE.
8787

88+
if HAS_FLASH_LOAD_OFFSET
89+
8890
config USE_DT_CODE_PARTITION
8991
bool "Link application into /chosen/zephyr,code-partition from devicetree"
90-
depends on HAS_FLASH_LOAD_OFFSET
9192
help
9293
When enabled, the application will be linked into the flash partition
9394
selected by the zephyr,code-partition property in /chosen in devicetree.
@@ -102,7 +103,6 @@ config FLASH_LOAD_OFFSET
102103
hex "Kernel load offset" if !USE_DT_CODE_PARTITION
103104
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION
104105
default 0
105-
depends on HAS_FLASH_LOAD_OFFSET
106106
help
107107
This option specifies the byte offset from the beginning of flash that
108108
the kernel should be loaded into. Changing this value from zero will
@@ -116,7 +116,6 @@ config FLASH_LOAD_SIZE
116116
hex "Kernel load size" if !USE_DT_CODE_PARTITION
117117
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION
118118
default 0
119-
depends on HAS_FLASH_LOAD_OFFSET
120119
help
121120
If non-zero, this option specifies the size, in bytes, of the flash
122121
area that the Zephyr image will be allowed to occupy. If zero, the
@@ -125,6 +124,8 @@ config FLASH_LOAD_SIZE
125124

126125
If unsure, leave at the default value 0.
127126

127+
endif # HAS_FLASH_LOAD_OFFSET
128+
128129
config TEXT_SECTION_OFFSET
129130
hex
130131
prompt "TEXT section offset" if !BOOTLOADER_MCUBOOT

0 commit comments

Comments
 (0)