Thanks Sami. I will fix them all and send the v2 later. From: Sami Mujawar Sent: Thursday, August 18, 2022 7:41 PM To: Jianyong Wu ; devel@edk2.groups.io Cc: Ard Biesheuvel ; Justin He ; nd Subject: Re: [edk2-devel] [PATCH 1/2] CloudHv/arm: add PeiMemInfoLib Hi Jianyong, Please find my response inline marked [SAMI]. Regards, Sami Mujawar From: Jianyong Wu > Date: Thursday, 18 August 2022 at 06:22 To: "devel@edk2.groups.io" >, Jianyong Wu >, Sami Mujawar > Cc: Ard Biesheuvel >, Justin He >, nd > Subject: RE: [edk2-devel] [PATCH 1/2] CloudHv/arm: add PeiMemInfoLib Hi Sami, Thanks for review. All the comments are Ok for me. Just one inline reply: + +struct CloudHvMemNodeInfo CloudHvMemNode[CLOUDHV_MAX_MEM_NODE_NUM]; + +RETURN_STATUS +EFIAPI +CloudHvVirtMemInfoPeiLibConstructor ( + VOID + ) +{ + VOID *DeviceTreeBase; + EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttributes; + INT32 Node, Prev; + UINT64 CurBase, MemBase; + UINT64 CurSize; + CONST CHAR8 *Type; + INT32 Len; + CONST UINT64 *RegProp; + RETURN_STATUS PcdStatus; + UINT8 Index; + + ZeroMem (CloudHvMemNode, sizeof(CloudHvMemNode[0]) * CLOUDHV_MAX_MEM_NODE_NUM); [SAMI] Will sizeof (CloudHvMemNode) should be sufficient above? Also, can you run uncrustify on your patches, please? [Jong] The local uncrustify test environment is not ready. But I think “sizeof” here is OK, as this struct contains only two u64 variables, thus no padding here. If sizeof is not preference here, is there any suggestion from you? [SAMI] I think you could just use + ZeroMem (CloudHvMemNode, sizeof(CloudHvMemNode)); Also, let me know if you need any help to get uncrustify working locally. I will dig out the relevant information for you. [/SAMI] Thanks Jianyong