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:
wangchengdong 2025-09-16 16:42:13 +08:00 committed by Alan C. Assis
parent 12486d21dc
commit 5d80cf7b83

View file

@ -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 */