arch/tricore: remove magic number in tricore_checkstack.c
before: | start = (alloc + 3) & ~3; | end = (alloc + size) & ~3; after: | start = STACK_ALIGN_UP((uintptr_t)alloc); | end = STACK_ALIGN_DOWN((uintptr_t)alloc + size); Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
parent
12486d21dc
commit
5d80cf7b83
1 changed files with 2 additions and 2 deletions
|
|
@ -79,8 +79,8 @@ size_t tricore_stack_check(uintptr_t alloc, size_t size)
|
|||
|
||||
/* Get aligned addresses of the top and bottom of the stack */
|
||||
|
||||
start = (alloc + 3) & ~3;
|
||||
end = (alloc + size) & ~3;
|
||||
start = STACK_ALIGN_UP((uintptr_t)alloc);
|
||||
end = STACK_ALIGN_DOWN((uintptr_t)alloc + size);
|
||||
|
||||
/* Get the adjusted size based on the top and bottom of the stack */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue