summaryrefslogtreecommitdiffstats
path: root/arch/loongarch
diff options
context:
space:
mode:
authorKaiLong Wang <wangkailong@jari.cn>2022-11-21 19:02:57 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2022-11-21 19:02:57 +0800
commitb96e74bb439f096168c78ba3ba1599e0b85cfd73 (patch)
tree46589c1433bcf278b58f6cd097900e2a0dbca2c0 /arch/loongarch
parent54e6cd42a183b602e3627ad3aaeeed44f7443e67 (diff)
downloadlinux-stable-b96e74bb439f096168c78ba3ba1599e0b85cfd73.tar.gz
linux-stable-b96e74bb439f096168c78ba3ba1599e0b85cfd73.tar.bz2
linux-stable-b96e74bb439f096168c78ba3ba1599e0b85cfd73.zip
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: KaiLong Wang <wangkailong@jari.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch')
-rw-r--r--arch/loongarch/kernel/unwind_prologue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/loongarch/kernel/unwind_prologue.c b/arch/loongarch/kernel/unwind_prologue.c
index b206d9159205..4571c3c87cd4 100644
--- a/arch/loongarch/kernel/unwind_prologue.c
+++ b/arch/loongarch/kernel/unwind_prologue.c
@@ -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)