-
Notifications
You must be signed in to change notification settings - Fork 321
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
Rename IS_ALIGN() to SOF_IS_ALIGN() #8755
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,14 +14,8 @@ | |
/* callers must check/use the return value */ | ||
#define __must_check __attribute__((warn_unused_result)) | ||
|
||
#ifdef __ZEPHYR__ | ||
#include <zephyr/sys/util.h> | ||
#endif | ||
|
||
/* Align the number to the nearest alignment value */ | ||
#ifndef IS_ALIGNED | ||
#define IS_ALIGNED(size, alignment) ((size) % (alignment) == 0) | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if zephyrproject-rtos/zephyr#67243 happens to be merged before this (yes, I know that it's currently blocked) and we move to a Zephyr version after it, this would break compilation. Why not just merge these two commits? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we probably should hold of until we can get the Zephyr interface merged in. We have the SMP interface in flight (plus the regression), so the air is getting too thick with incompatible combinations. |
||
#define SOF_IS_ALIGNED(size, alignment) ((size) % (alignment) == 0) | ||
|
||
/* Treat zero as a special case because it wraps around */ | ||
#define is_power_of_2(x) ((x) && !((x) & ((x) - 1))) | ||
|
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.
is it the plan then after zephyrproject-rtos/zephyr#67243 is merged to move to the "proper" Zephyr-provided
IS_ALIGNED()
and to rename back?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.
I think an alternative would be to take the Zephyr change with IS_ALIGNED in, then add IS_ALIGNED definition only for xtos builds in SOF, and call it a day.
The current ifdef can carry us until then.
Or we merge this, but I agree this is going against our long term plans. We want to use native Zephyr interfaces in generic SOF code whenever possible (e.g. #5794).