From patchwork Thu Jun 2 04:00:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 578294 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CB28C43334 for ; Thu, 2 Jun 2022 04:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbiFBEAX (ORCPT ); Thu, 2 Jun 2022 00:00:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbiFBEAW (ORCPT ); Thu, 2 Jun 2022 00:00:22 -0400 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13B281D5016; Wed, 1 Jun 2022 21:00:20 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R101e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=alimailimapcm10staff010182156082; MF=jiapeng.chong@linux.alibaba.com; NM=1; PH=DS; RN=7; SR=0; TI=SMTPD_---0VF8otVW_1654142413; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VF8otVW_1654142413) by smtp.aliyun-inc.com(127.0.0.1); Thu, 02 Jun 2022 12:00:18 +0800 From: Jiapeng Chong To: ardb@kernel.org Cc: chenhuacai@kernel.org, kernel@xen0n.name, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] LoongArch: Fix unsigned expression compared with zero Date: Thu, 2 Jun 2022 12:00:12 +0800 Message-Id: <20220602040012.19756-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org 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 Signed-off-by: Jiapeng Chong --- 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()) {