-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
mm_drv: tlb: Fix compile time warning #62854
Conversation
Should I fix the commit message to fit into 75 chars? This would be very hard as I was trying to offer a snippet of the compile time warning. I think we should go to 100 chars per line for commit message as Linux does. |
@dbaluta wrote:
Thanks for doing this, still not sure how this started failing builds now. I think Zephyr folks prefer to line-wrap the commit messages with an indent on the wrapped line (like commit 5689916 ). |
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'll approve, but I think this we'll need an small update to make the mandatory checks to pass.
Please review #62876 first, it will it easier for you to submit that change later.
For now just trim some verbosity and insert some newlines. You can test locally with |
@@ -667,7 +667,7 @@ static int sys_mm_drv_mm_init(const struct device *dev) | |||
L2_SRAM_BASE > UNUSED_L2_START_ALIGNED) { | |||
|
|||
__ASSERT(false, | |||
"unused l2 pointer is outside of l2 sram range %p\n", | |||
"unused l2 pointer is outside of l2 sram range %lu\n", |
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.
Wait, is this not going to change the display from hex to decimal?
Why not just cast to (void *)
instead?
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.
@marc-hb I think you are right, we want to print the pointer in hex. Fixed this plus commit message.
Thanks!
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.
Wait, is this not going to change the display from hex to decimal?
Dismiss my request for changes if I'm wrong.
This fixes the following compile time warning; drivers/mm/mm_drv_intel_adsp_mtl_tlb.c: In function 'sys_mm_drv_mm_init': include/zephyr/sys/__assert.h:44:52: error: format '%p' expects argument of type 'void *', but argument 2 has type 'long unsigned int' [-Werror=format=] __ASSERT_PRINT("\t" fmt "\n", ##__VA_ARGS__) Signed-off-by: Daniel Baluta <[email protected]>
This fixes the following compile time warning;