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

scripts: kconfig: Fix uses of edt.compat2okay in helper functions #31926

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

anangl
Copy link
Member

@anangl anangl commented Feb 3, 2021

Check if a given 'compat' is a key in edt.compat2okay before accessing
its entry in dt_compat_on_bus() and dt_nodelabel_has_compat(), as for
a non-existing key a new entry with an empty list would be created,
and dt_compat_enabled() would then incorrectly return "y" when called
for the same 'compat'.

This issue currently causes CI for #31624 to fail (CONFIG_GPIO_PCAL6408A gets incorrectly enabled here because of this check, and that results in the driver being compiled without any enabled instances of the corresponding hardware).

Check if a given 'compat' is a key in edt.compat2okay before accessing
its entry in dt_compat_on_bus() and dt_nodelabel_has_compat(), as for
a non-existing key a new entry with an empty list would be created,
and dt_compat_enabled() would then incorrectly return "y" when called
for the same 'compat'.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
@anangl anangl added the bug The issue is a bug, or the PR is fixing a bug label Feb 3, 2021
@anangl anangl added this to the v2.5.0 milestone Feb 3, 2021
@anangl anangl requested a review from ulfalizer as a code owner February 3, 2021 13:29
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a comment

Choose a reason for hiding this comment

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

Thanks.

@galak galak self-assigned this Feb 4, 2021
@nashif nashif merged commit f9c1f89 into zephyrproject-rtos:master Feb 9, 2021
@anangl anangl deleted the fix_compat2okay_uses branch February 11, 2021 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Kconfig bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants