Hi Sami,

On 7/3/24 12:35, Sami Mujawar wrote:
Hi Pierre,

Thank you for these patches.


On 03/07/2024, 10:54, "Pierre Gondois" <pierre.gond...@arm.com 
<mailto:pierre.gond...@arm.com>> wrote:


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
- '=': conversion from 'UINTxx' to 'UINTyy', possible loss of data
with xx > yy.


Add checks/cast to remove the warnings.


Signed-off-by: Pierre Gondois <pierre.gond...@arm.com 
<mailto:pierre.gond...@arm.com>>
---
.../Acpi/Common/AcpiPcctLib/PcctGenerator.c | 15 +++++++++++----
.../SsdtCpuTopologyGenerator.c | 6 ++++--
.../Common/AcpiSsdtPcieLib/SsdtPcieGenerator.c | 15 ++++++++++-----
3 files changed, 25 insertions(+), 11 deletions(-)


diff --git a/DynamicTablesPkg/Library/Acpi/Common/AcpiPcctLib/PcctGenerator.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 = &GenericPccCmObj->DoorbellReg;


ChannelTiming = &GenericPccCmObj->ChannelTiming;






+ ASSERT ((PccCmObj->PlatIrq.Flags >> 8) == 0);

[SAMI] I think we can change this to ASSERT ((PccCmObj->PlatIrq.Flags & 
~MAX_UINT8) == 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


Otherwise, this series looks good to me.

Reviewed-by: Sami Mujawar <sami.muja...@arm.com>


Regards,

Sami Mujawar



-=-=-=-=-=-=-=-=-=-=-=-
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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to