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

device: add braces around dev/dev_rw initializer #65912

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

fabiobaltieri
Copy link
Member

@fabiobaltieri fabiobaltieri commented Nov 29, 2023

See


The init_entry struct got modified to add a union with a non const dev pointer in afc5911. Some old compiler (such as GCC 4) seems to require a pair of brackets to correctly initialize the field in the union. Add those brackets to the initializers in device.h and init.h to maintain compatibility.

include/zephyr/init.h Outdated Show resolved Hide resolved
gmarull
gmarull previously approved these changes Nov 29, 2023
@fabiobaltieri
Copy link
Member Author

dropped the init entry and inlined the whole initializer, fixed up a misaligned closing brace in the device one

gmarull
gmarull previously approved these changes Nov 29, 2023
The init_entry struct got modified to add a union with a non const dev
pointer in afc5911. Some old compiler (such as GCC 4) seems to
require a pair of brackets to correctly initialize the field in the
union. Add those brackets to the initializers in device.h and init.h to
maintain compatibility.

Signed-off-by: Fabio Baltieri <[email protected]>
@fabiobaltieri
Copy link
Member Author

no nevermind, that brace was in the right spot, put it back, sorry @gmarull :-)

Copy link
Member

@cfriedt cfriedt left a comment

Choose a reason for hiding this comment

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

Thanks for the fix 😄

@cfriedt
Copy link
Member

cfriedt commented Nov 29, 2023

We should have @marc-hb test this before merging. Adding DNM for now.

@cfriedt cfriedt added the DNM This PR should not be merged (Do Not Merge) label Nov 29, 2023
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

This fixes the compilation failure with gcc 4.2.0 reported in #62998, thanks for the very quick fix!

@marc-hb marc-hb added bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc. and removed DNM This PR should not be merged (Do Not Merge) labels Nov 29, 2023
@fabiobaltieri fabiobaltieri added Regression Something, which was working, does not anymore Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels Nov 29, 2023
@fabiobaltieri
Copy link
Member Author

This fixes the compilation failure with gcc 4.2.0 reported in #62998, thanks for the very quick fix!

Good stuff, yeah it was interesting. :-) Let me just add all the tags I can think of and merge...

@fabiobaltieri fabiobaltieri merged commit 153f38a into zephyrproject-rtos:main Nov 29, 2023
30 of 31 checks passed
@fabiobaltieri fabiobaltieri deleted the dev-rw-union branch November 29, 2023 14:44
@marc-hb marc-hb added the platform: Intel ADSP Intel Audio platforms label Nov 29, 2023
@marc-hb
Copy link
Collaborator

marc-hb commented Jan 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Device Model bug The issue is a bug, or the PR is fixing a bug Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc. platform: Intel ADSP Intel Audio platforms priority: high High impact/importance bug Regression Something, which was working, does not anymore Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants