From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 470E7740040 for ; Wed, 3 Jul 2024 10:44:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=f+v2sLMRZB73TOFKz3JTnWhPyqF4vfEaybc2S7CYCsc=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1720003468; v=1; b=qzKs6S/pJstqYw79dLR3rLbsUsLdAItgv/82X6UOahN78vNM8vAAQm/xv2r6xL0d07+vebxu 4VpDk32tSuoDWGh58pCOM1XGTAiUJVuFnKo+cBW/5IXjO+fq9uK7WpGFPTM/fwYIw+Lq63wmGAi c5davJtADz9vJiKXFXQeUHQKgQw+AQmbLN9Sg2YPh7gMFGKgYEBcssgL5IrOoFlvyMXSCtQjfI8 /lh8hLE6XvKnUt5KzoKnwCpzjSN6KXyM8MtyWG5hYq7XM6MEu/J9L7uYp3acg3M1PfmCi0t/0ux /fwLg3qZvAt7s1TvdvJAPNzHFMe7lagyY64DyTy0ajkBA== X-Received: by 127.0.0.2 with SMTP id nARcYY7687511xTyt9DyP2BZ; Wed, 03 Jul 2024 03:44:26 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.47468.1720003461011629955 for ; Wed, 03 Jul 2024 03:44:21 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B24E9367; Wed, 3 Jul 2024 03:44:45 -0700 (PDT) X-Received: from [192.168.1.13] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 38D903F766; Wed, 3 Jul 2024 03:44:17 -0700 (PDT) Message-ID: <2a3f7905-cfd5-468e-a307-95a5eb6482b9@arm.com> Date: Wed, 3 Jul 2024 12:44:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [staging/dynamictables-reorg PATCH 1/2] DynamicTablesPkg: Fix conversion compiler warnings To: Sami Mujawar , "devel@edk2.groups.io" Cc: AbdulLateef Attar , Girish Mahadevan , "Jeff Brasen (jbrasen@nvidia.com)" , Jeshua Smith , Leif Lindholm , "Meenakshi Aggarwal (meenakshi.aggarwal@nxp.com)" , Sunil V L , Yeo Reum Yun , nd References: <20240703095340.3402057-1-pierre.gondois@arm.com> <20240703095340.3402057-2-pierre.gondois@arm.com> From: "PierreGondois" In-Reply-To: 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 Resent-Date: Wed, 03 Jul 2024 03:44:21 -0700 Resent-From: pierre.gondois@arm.com Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Hk8oPYgnwCxA9sdKW65pcQ2zx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="qzKs6S/p"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Sami, On 7/3/24 12:35, Sami Mujawar wrote: > Hi Pierre, >=20 > Thank you for these patches. >=20 >=20 > =EF=BB=BFOn 03/07/2024, 10:54, "Pierre Gondois" > wrote: >=20 >=20 > Some CM objects fields are wider than the targeted field in ACPI > tables. Some assignments are also subject to data loss and > trigger the following warnings: > - '<': signed/unsigned mismatch > - '=3D': conversion from 'UINTxx' to 'UINTyy', possible loss of data > with xx > yy. >=20 >=20 > Add checks/cast to remove the warnings. >=20 >=20 > Signed-off-by: Pierre Gondois > > --- > .../Acpi/Common/AcpiPcctLib/PcctGenerator.c | 15 +++++++++++---- > .../SsdtCpuTopologyGenerator.c | 6 ++++-- > .../Common/AcpiSsdtPcieLib/SsdtPcieGenerator.c | 15 ++++++++++----- > 3 files changed, 25 insertions(+), 11 deletions(-) >=20 >=20 > diff --git a/DynamicTablesPkg/Library/Acpi/Common/AcpiPcctLib/PcctGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Common/AcpiPcctLib/PcctGenerator.c > index 205c44405785..061e12bf1b3d 100644 > --- a/DynamicTablesPkg/Library/Acpi/Common/AcpiPcctLib/PcctGenerator.c > +++ b/DynamicTablesPkg/Library/Acpi/Common/AcpiPcctLib/PcctGenerator.c > @@ -379,10 +379,12 @@ AddSubspaceStructType1 ( > Doorbell =3D &GenericPccCmObj->DoorbellReg; >=20 >=20 > ChannelTiming =3D &GenericPccCmObj->ChannelTiming; >=20 >=20 >=20 >=20 >=20 >=20 > + ASSERT ((PccCmObj->PlatIrq.Flags >> 8) =3D=3D 0); >=20 > [SAMI] I think we can change this to ASSERT ((PccCmObj->PlatIrq.Flags & ~= MAX_UINT8) =3D=3D 0); > That way we can also avoid magic numbers. > I think similar changes are required elsewhere in this patch. > If you agree, I will make the changes before merging. Yes sure, thanks! Regards, Pierre >=20 > Otherwise, this series looks good to me. >=20 > Reviewed-by: Sami Mujawar >=20 >=20 > Regards, >=20 > Sami Mujawar >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119783): https://edk2.groups.io/g/devel/message/119783 Mute This Topic: https://groups.io/mt/107016603/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-