lkml.org 
[lkml]   [2022]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] LoongArch: Fix unsigned expression compared with zero
Date
Fix the following coccicheck warnings:

./arch/loongarch/kernel/efi.c:157:5-11: WARNING: Unsigned expression
compared with zero: status < 0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
arch/loongarch/kernel/efi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/loongarch/kernel/efi.c b/arch/loongarch/kernel/efi.c
index d36a325a990c..2f25a7fe0868 100644
--- a/arch/loongarch/kernel/efi.c
+++ b/arch/loongarch/kernel/efi.c
@@ -145,16 +145,13 @@ static int __init set_virtual_map(void)

void __init efi_runtime_init(void)
{
- efi_status_t status;
-
if (!efi_enabled(EFI_BOOT))
return;

if (!efi_systab->runtime)
return;

- status = set_virtual_map();
- if (status < 0)
+ if (set_virtual_map() < 0)
return;

if (efi_runtime_disabled()) {
--
2.20.1.7.g153144c
\
 
 \ /
  Last update: 2022-06-02 06:01    [W:0.173 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site