-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
sys: util: force Zephyr BIT/MIN/MAX/CLAMP definitions #56629
Conversation
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
@gmarull, hal_espressif PR merged. I'll approve when this PR manifest gets update as well. |
2401aa4
to
4bcec20
Compare
bf73a0f
to
90605bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Sort includes - Remove some Kernel internal includes - Make sure Zephyr headers come first, so Zephyr's BIT() doesn't conflict with HAL. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Avoid redefinition errors due to HAL defining BIT() macro in public headers. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
We've been guarding the definition of BIT/MIN/MAX/CLAMP macros as they are commonly found in other projects. This is dangerous, because depending on the order of includes, Zephyr code could end up using macros defined by other projects (e.g. via HALs). The current #ifndef _protection_ goes against the recently established guidelines in zephyrproject-rtos#51963, so let's remove it. Ref. https://docs.zephyrproject.org/latest/contribute/coding_guidelines/ index.html#rule-a-3-macro-name-collisions Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
We've been guarding the definition of BIT/MIN/MAX/CLAMP macros as they are commonly found in other projects. This is dangerous, because depending on the order of includes, Zephyr code could end up using macros defined by other projects (e.g. via HALs).
The current #ifndef protection goes against the recently established guidelines in #51963, so let's remove it.
Ref. https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html#rule-a-3-macro-name-collisions