Skip to content

Commit

Permalink
secure_storage: swap select to depends on
Browse files Browse the repository at this point in the history
Mixing `select` and `depends on` is a common source of Kconfig
dependency loops and should be avoided. Both `ZMS` and `SETTINGS` are
more commonly used with `depends on` rather than `select`.

The usage here also contradicts the Zephyr best practices guide for
`select`:
 * Avoid selecting symbols with prompts or dependencies.
   Prefer depends on.

Signed-off-by: Jordan Yates <jordan@embeint.com>
  • Loading branch information
JordanYates committed Feb 23, 2025
1 parent 1ea8bd4 commit 89cace2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subsys/secure_storage/Kconfig.its_store
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ config SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_ZMS
depends on FLASH_HAS_DRIVER_ENABLED \
&& $(dt_path_enabled,$(DT_ITS_PARTITION)) \
&& $(dt_node_has_compat,$(dt_node_parent,$(DT_ITS_PARTITION)),fixed-partitions)
select ZMS
depends on ZMS
help
This implementation of the ITS store module makes direct use of ZMS for storage.
It needs a `secure_storage_its_partition` devicetree chosen property that points
Expand All @@ -31,7 +31,7 @@ config SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS
&& $(dt_node_has_compat,$(dt_node_parent,$(DT_SETTINGS_PARTITIION)),fixed-partitions))\
|| ($(dt_path_enabled,$(DT_STORAGE_PARTITION)) \
&& $(dt_node_has_compat,$(dt_node_parent,$(DT_STORAGE_PARTITION)),fixed-partitions)))
select SETTINGS
depends on SETTINGS

config SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_NONE
bool "No ITS store module implementation"
Expand Down

0 comments on commit 89cace2

Please sign in to comment.