From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C9BAA94141C for ; Fri, 9 Feb 2024 11:56:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5/dpoOGcXpWyoZ3VMR9Ok5g+i082K4IQqyuK+tufqDA=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1707479808; v=1; b=EjBm2bGcdOAhh1ZJV4uIR2UqZt5YNYQ6qXe/CaM0VjYsgj3OZTLK0Vt/HM6oOTYs3PrWmDXG X+zUo3GJZNRf3vEF1J25IyEU3FphfcCj08D7d9ZmOvNsEmnV81+jgyD3Q8uvDbAuadDqhuIiIhM YDKHJFd+VTIeW5K3ZfngQpC0= X-Received: by 127.0.0.2 with SMTP id Z5kwYY7687511xpKb4tbxnIu; Fri, 09 Feb 2024 03:56:48 -0800 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.9747.1707479807637167738 for ; Fri, 09 Feb 2024 03:56:47 -0800 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1AE5E62090 for ; Fri, 9 Feb 2024 11:56:47 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DAC9C433B2 for ; Fri, 9 Feb 2024 11:56:46 +0000 (UTC) X-Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d0ce2222a6so9579321fa.3 for ; Fri, 09 Feb 2024 03:56:46 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUTwsVm95bTQryR8YNVcmn1FeJ+uPtpcNGq4lkpuAz58RtOq3DN2qT8RCUiTkIL5kymfGGlcofidBEUE6kreOv4WTtIZg== X-Gm-Message-State: HoSfRvy7tj7MQAo4x23PPwggx7686176AA= X-Google-Smtp-Source: AGHT+IGK0twrGB5kRydkFwn/EkEPwVMgEIvb6c5iEh8AvcsvlnYrSxnY2bRIEtZO+UZGCEN/wWQr4W0I7m9V5SsbKlg= X-Received: by 2002:a2e:9f44:0:b0:2d0:8918:f36d with SMTP id v4-20020a2e9f44000000b002d08918f36dmr1092730ljk.4.1707479804659; Fri, 09 Feb 2024 03:56:44 -0800 (PST) MIME-Version: 1.0 References: <20240206161931.530-1-n.jayaprakash@intel.com> <20240206161931.530-2-n.jayaprakash@intel.com> In-Reply-To: From: "Ard Biesheuvel" Date: Fri, 9 Feb 2024 11:56:33 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [edk2 Patch 2 1/1] EmbeddedPkg: compiler error due to arithmetic operation on void pointer To: Laszlo Ersek , Michael D Kinney , "Liming Gao (Byosoft address)" Cc: Jayaprakash N , devel@edk2.groups.io, Rebecca Cran , Leif Lindholm , Abner Chang Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=EjBm2bGc; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io (cc Liming) On Wed, 7 Feb 2024 at 20:00, Laszlo Ersek wrote: > > On 2/6/24 17:19, Jayaprakash N wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4668 > > > > This commit fixes the issue reported in the BZ4668. > > The EmbeddedPkg fails to compile with a compiler error > > generated due to invalid/illegal arithmetic operation > > on void pointers. It has been fixed by using explicit > > type conversion of the void pointer to UINTN. > > > > Cc: Rebecca Cran > > Cc: Michael D Kinney > > Cc: Laszlo Ersek > > Cc: Leif Lindholm > > Cc: Ard Biesheuvel > > Cc: Abner Chang > > Cc: Jayaprakash N > > Signed-off-by: Jayaprakash N > > --- > > .../Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c > > index fa81cc9d59..f4077c04a7 100644 > > --- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c > > +++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c > > @@ -308,7 +308,7 @@ ReallocatePool ( > > if (OldBuffer != NULL) { > > HandOffHob = GetHobList (); > > ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)OldBuffer >= HandOffHob->EfiMemoryBottom)); > > - ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)(OldBuffer + OldSize) <= HandOffHob->EfiFreeMemoryBottom)); > > + ASSERT (((EFI_PHYSICAL_ADDRESS)((UINTN)OldBuffer + OldSize) <= HandOffHob->EfiFreeMemoryBottom)); > > } > > > > DEBUG_CODE_END (); > > Reviewed-by: Laszlo Ersek > Reviewed-by: Ard Biesheuvel Liming, Michael - please apply this for the stable tag -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115302): https://edk2.groups.io/g/devel/message/115302 Mute This Topic: https://groups.io/mt/104200842/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-