From nobody Wed Apr 16 13:42:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1534274118834356.6981708430434; Tue, 14 Aug 2018 12:15:18 -0700 (PDT) Received: from localhost ([::1]:45945 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpeme-0000or-Ok for importer@patchew.org; Tue, 14 Aug 2018 15:15:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpdvc-00051O-73 for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:22:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpduB-0006mO-JP for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:20:23 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:44424) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fpduB-0006lk-1d for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:18:55 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fpdu9-0007LO-PX for qemu-devel@nongnu.org; Tue, 14 Aug 2018 19:18:53 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 14 Aug 2018 19:18:02 +0100 Message-Id: <20180814181815.23348-33-peter.maydell@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180814181815.23348-1-peter.maydell@linaro.org> References: <20180814181815.23348-1-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 32/45] arm: Fix return code of arm_load_elf X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Adam Lackorzynski Use an int64_t as a return type to restore the negative check for arm_load_as. Signed-off-by: Adam Lackorzynski Message-id: 20180730173712.GG4987@os.inf.tu-dresden.de Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/boot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index e09201cc97c..ca9467e583f 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -818,9 +818,9 @@ static int do_arm_linux_init(Object *obj, void *opaque) return 0; } =20 -static uint64_t arm_load_elf(struct arm_boot_info *info, uint64_t *pentry, - uint64_t *lowaddr, uint64_t *highaddr, - int elf_machine, AddressSpace *as) +static int64_t arm_load_elf(struct arm_boot_info *info, uint64_t *pentry, + uint64_t *lowaddr, uint64_t *highaddr, + int elf_machine, AddressSpace *as) { bool elf_is64; union { @@ -829,7 +829,7 @@ static uint64_t arm_load_elf(struct arm_boot_info *info= , uint64_t *pentry, } elf_header; int data_swab =3D 0; bool big_endian; - uint64_t ret =3D -1; + int64_t ret =3D -1; Error *err =3D NULL; =20 =20 --=20 2.18.0