Commit b96e74bb authored by KaiLong Wang's avatar KaiLong Wang Committed by Huacai Chen

LoongArch: Fix unsigned comparison with less than zero

Eliminate the following coccicheck warning:

./arch/loongarch/kernel/unwind_prologue.c:84:5-13: WARNING: Unsigned
expression compared with zero: frame_ra < 0
Signed-off-by: default avatarKaiLong Wang <wangkailong@jari.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 54e6cd42
......@@ -43,7 +43,8 @@ static bool unwind_by_prologue(struct unwind_state *state)
{
struct stack_info *info = &state->stack_info;
union loongarch_instruction *ip, *ip_end;
unsigned long frame_size = 0, frame_ra = -1;
long frame_ra = -1;
unsigned long frame_size = 0;
unsigned long size, offset, pc = state->pc;
if (state->sp >= info->end || state->sp < info->begin)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment