From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c0c::22f; helo=mail-wr0-x22f.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x22f.google.com (mail-wr0-x22f.google.com [IPv6:2a00:1450:400c:c0c::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B017321E43B6C for ; Sun, 24 Sep 2017 18:43:01 -0700 (PDT) Received: by mail-wr0-x22f.google.com with SMTP id 108so5233236wra.5 for ; Sun, 24 Sep 2017 18:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Mjk40BeVBzX2BPKw5ESD5R/yILPybKxgifQJsGCHarg=; b=kPk0zMbhzXjtViHwNbeOPmooJNzvDrFt9e/4pnxMruljABkAa5pWnZn1oLmmAvBBde 41YcaDEj3JLplB1cOWrCC6j9hpTwOmbh7U5YGBYG8zs/YBT+fE9hlHfC2V6+irZ7eFdk glh/h+dQE75R3ell3lze88CIKsrRF57pPR+nRrT8o37SDqHg7dOz87iDdwjVnI6EBXbU 7Lqv9IHMD0uTPC8LjgBmki64N3+ai/bXsahacgwIQqbdi+3D/QH68130aS2yQSv1Bai9 T7L9iNPjnGq3ht+7i2FAMeoGwjSj4cfwSrO9UcWpEYvenuDK5BjcSf4Vt+DnfEjTCGLY 4qLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Mjk40BeVBzX2BPKw5ESD5R/yILPybKxgifQJsGCHarg=; b=eQO2eQCW3buchzXENZ6FKblNGIqaNbOQ7tRsfvOfBJ9wQK6t8fgrJ9C3946vPxQn0O xPdPn2vS9bCIcSXcgK3IyX16rz4nLel8YC3FcjMF58IomVstHhOD8Itp17k1xgZainlz dra+1iSxDZnhWO+uMzRqa9QoAjxKtx1exHnZq/fNYwo4TtSz5Ei0uTNF8bukdfgnxb7/ fa3+es4FxvfHF/TejMA3LoVeqxhw6RMglyjpdOrW7p3jPROOOWe+2PNmnCPmDlydOEYV +IZUbxVzZlkAdP0E+rwUlBcJcwrftd2AuH9MPc3xTnkjHTJ1JqT5W1peSQ/WtznMicrB Lo9g== X-Gm-Message-State: AHPjjUjupvdv//okuZwPJ/zt+s0gsNsWYVMowEVfkIXR6qNkbvjACz9x 7LPjv3Ntu5BABvjWraGMUbkJ/BOhcBw= X-Google-Smtp-Source: AOwi7QCKDx9LjAHMEkbVP7jyhx5B8u3XwqjkKjVR40Vc86XyrpBtWGcZ0i2z7XACOEwRYtLYeb76ow== X-Received: by 10.46.71.193 with SMTP id u184mr2240078lja.166.1506303970967; Sun, 24 Sep 2017 18:46:10 -0700 (PDT) Received: from enkidu.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id f16sm809520lfe.66.2017.09.24.18.46.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Sep 2017 18:46:10 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, neta@marvell.com, kostap@marvell.com, jinghua@marvell.com, agraf@suse.de, mw@semihalf.com, jsd@semihalf.com Date: Mon, 25 Sep 2017 03:51:57 +0200 Message-Id: <1506304319-8620-9-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1506304319-8620-1-git-send-email-mw@semihalf.com> References: <1506304319-8620-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH 08/10] Marvell/Applications/SpiTool: Fix 32-bit issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2017 01:43:02 -0000 From: Ard Biesheuvel Fix casting and related issues to make this code build for 32-bit ARM. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Signed-off-by: Marcin Wojtas --- Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c b/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c index e6e1007..9321f6b 100644 --- a/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c +++ b/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c @@ -211,7 +211,8 @@ EFI_STATUS Status; LIST_ENTRY *CheckPackage; EFI_PHYSICAL_ADDRESS Address = 0, Offset = 0; SHELL_FILE_HANDLE FileHandle = NULL; - UINTN ByteCount, FileSize, I; + UINTN ByteCount, I; + UINT64 FileSize; UINT8 *Buffer = NULL, *FileBuffer = NULL; CHAR16 *ProblemParam, *FilePath; CONST CHAR16 *AddressStr = NULL, *OffsetStr = NULL; @@ -418,7 +419,7 @@ EFI_STATUS Status; } } - Buffer = (UINT8 *) Address; + Buffer = (UINT8 *)(UINTN)Address; if (FileFlag) { Buffer = FileBuffer; } -- 1.8.3.1