https://github.com/torvalds/linux
Revision aafcac81b0e3f0d7383a78c6249e90e166ac8e6d authored by Yang Li on 06 August 2022, 07:19:33 UTC, committed by Huacai Chen on 12 August 2022, 05:10:10 UTC
The return value from the call to get_timer_irq() is int, which can be
a negative error code. However, the return value is being assigned to an
unsigned int variable 'irq', so making 'irq' an int.

Eliminate the following coccicheck warning:
./arch/loongarch/kernel/time.c:146:5-8: WARNING: Unsigned expression compared with zero: irq < 0

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent f30d1f4
History
Tip revision: aafcac81b0e3f0d7383a78c6249e90e166ac8e6d authored by Yang Li on 06 August 2022, 07:19:33 UTC
LoongArch: Fix unsigned comparison with less than zero
Tip revision: aafcac8

back to top