Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2576475ioo; Tue, 24 May 2022 00:39:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8BSgheTVgGMaGowAebF8PfS7tQGJXKx1hIEjAuizp11VZhTTzut07vEDZvglPXUwbGh6x X-Received: by 2002:a17:90a:780d:b0:1df:959:235a with SMTP id w13-20020a17090a780d00b001df0959235amr3306986pjk.92.1653377995617; Tue, 24 May 2022 00:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653377995; cv=none; d=google.com; s=arc-20160816; b=D3RGQXxywURUVwGCYy7u7tBCtXCuZofFyJ2NwLyYqbUxVWK+vQ9/T5qHL7FBJmLyiM lKNvaUu9LgxhaLO9g3yxECFYGE59DaAx27Gf3HiNnuxnpnTmP8d0kzJndVGZVnQZFQ0D JfTQt2C1xtQldvbsS6A6doQVTszwKVYGZlQjxF216NMBi7AnV2Fa0pB12okU/bKEfC+0 cr22IRGaFwWdrNkMlidIcasHJ/5a8RD4yPPYKO6a2Py+WGqB5eh5s9/20m7xmg/3I9Fj zrWJfPEa65NRAaoEt+ItFc0lcOBSjKNAVry41b9uClLXPh+W1RZ0bhmgCSxTzuj/vpoM +UYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=uqD5GWnOYw38cO468nZoaiho/qhVX3/9Dfmjmq7lCV4=; b=rq+DLiqsiGsJR2UPl6FLALk2fH3IklHei1edSzNovuL8KWz5rocFgPe2NPRzzHyR89 rx4eMI9zjFWAwdfjwXUx2WY7EU8fQ1fsH6rrXQl8iczdgzoARIr+LvpIirZuRJVlG02M jKvq3pepGHsjGj18DHDLaiH6cnvocdHUbVbSePTE2fp4nOpLTMAG4YTWajhZ06wlXOQS ojxe6SLril5dp3Df2XidbRhl5hKga2kxxCMCbRYdEtXoAcJz16HZQ5Ka/rrCaEsGbTfU HfG6mkxii+SCzk/LM01uki+LDYP3FsMhT37KT9KMJy9gziwL7EhSoVrhHZ8pb8uqiyxj JBeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d19-20020a63ed13000000b003ab21465565si13316557pgi.478.2022.05.24.00.39.43; Tue, 24 May 2022 00:39:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233446AbiEXCrf (ORCPT + 99 others); Mon, 23 May 2022 22:47:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232017AbiEXCrd (ORCPT ); Mon, 23 May 2022 22:47:33 -0400 Received: from mail.meizu.com (edge07.meizu.com [112.91.151.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4EA0369F1; Mon, 23 May 2022 19:47:30 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail11.meizu.com (172.16.1.15) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 24 May 2022 10:47:30 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Tue, 24 May 2022 10:47:28 +0800 From: Haowen Bai To: Ard Biesheuvel , Huacai Chen CC: Haowen Bai , , Subject: [PATCH] LoongArch: Fix unsigned function returning negative constant Date: Tue, 24 May 2022 10:47:25 +0800 Message-ID: <1653360446-15598-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function set_virtual_map has an unsigned return type, but returns a negative constant to indicate an error condition. So we change unsigned to int. Signed-off-by: Haowen Bai --- arch/loongarch/kernel/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/kernel/efi.c b/arch/loongarch/kernel/efi.c index 69ebdd4220ec..f9fdeb1ae358 100644 --- a/arch/loongarch/kernel/efi.c +++ b/arch/loongarch/kernel/efi.c @@ -102,7 +102,7 @@ static void __init fix_efi_mapping(void) * in @memory_map whose EFI_MEMORY_RUNTIME attribute is set. Those descriptors * are also copied to @runtime_map, and their total count is returned in @count. */ -static unsigned int __init set_virtual_map(void) +static int __init set_virtual_map(void) { int count = 0; unsigned int size; -- 2.7.4