Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secure_storage: fix Kconfig dependencies #86181

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JordanYates
Copy link
Collaborator

@JordanYates JordanYates commented Feb 22, 2025

SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS does not use either the FLASH_MAP or NVS APIs, only SETTINGS. Similarly, SECURE_STORAGE_ITS_STORE_MODULE does not consist of any code itself and therefore should not select or imply any options.

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.

@JordanYates JordanYates changed the title 250222 secure storage deps secure_storage: fix Kconfig dependencies Feb 22, 2025
@JordanYates JordanYates added this to the v4.1.0 milestone Feb 22, 2025
@zephyrbot zephyrbot added the area: Secure Storage Secure Storage label Feb 22, 2025
@zephyrbot zephyrbot requested a review from tomi-font February 22, 2025 11:57
rruuaanng
rruuaanng previously approved these changes Feb 22, 2025
Copy link
Collaborator

@rruuaanng rruuaanng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

`SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS` does not use either
the `FLASH_MAP` or `NVS` APIs, only `SETTINGS`.

Similarly, `SECURE_STORAGE_ITS_STORE_MODULE` does not consist of any
code itself and therefore should not select or imply any options.

Signed-off-by: Jordan Yates <jordan@embeint.com>
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>
@JordanYates
Copy link
Collaborator Author

Removed additional imply on SECURE_STORAGE_ITS_STORE_MODULE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Secure Storage Secure Storage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants