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 DC6DFAC1304 for ; Wed, 3 Apr 2024 09:27:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=YbWgI/vLEvPOmRFXWB+SzanT94DSHkC8DzWfX9PWUmo=; c=relaxed/simple; d=groups.io; h=Received-SPF:Message-ID:Date:User-Agent:To:CC:From:Subject:MIME-Version:NoDisclaimer: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=1712136448; v=1; b=G/Pt+ukpf6JrXF2PZtr08Y9laftmUQf0jdLa/DVk3tHW1jYdSbRNCQ0MxHnf8wpSbqaWixMd bN226fDIgzjiPdHZC0eZlzZYKregGURIBHtBg8thir3PFTY4OmGVgYxoIf8FCgX0X7/izRDpGkO mTCtTVmyhUchdpaWqNPihBVclTupfB/EiaJe9HOgKcMaX+H9MiD8UPH+EkydgPA/PDLjRglDGtC KDpReyb5WtxKXkOKIwiGFpVMJDFJypRi5s65qI74s3AiaxNAmuCaM0ORGMXj5YCLrYfFwISW2XK Dqb6IpC0OfKCm2ve+FXF2tExZl1P/PAqQpaIQd4LqGlAA== X-Received: by 127.0.0.2 with SMTP id fDZ9YY7687511xbLOydoZOUT; Wed, 03 Apr 2024 02:27:28 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.58]) by mx.groups.io with SMTP id smtpd.web10.7026.1712136447416321853 for ; Wed, 03 Apr 2024 02:27:27 -0700 X-Received: from DUZPR01CA0353.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b8::16) by AS2PR08MB10250.eurprd08.prod.outlook.com (2603:10a6:20b:641::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 3 Apr 2024 09:27:24 +0000 X-Received: from DU2PEPF00028D04.eurprd03.prod.outlook.com (2603:10a6:10:4b8:cafe::5e) by DUZPR01CA0353.outlook.office365.com (2603:10a6:10:4b8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.26 via Frontend Transport; Wed, 3 Apr 2024 09:27:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU2PEPF00028D04.mail.protection.outlook.com (10.167.242.164) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Wed, 3 Apr 2024 09:27:23 +0000 X-Received: ("Tessian outbound e26069fc76b9:v300"); Wed, 03 Apr 2024 09:27:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1dc16a4e37b7f74f X-CR-MTA-TID: 64aa7808 X-Received: from b8176c905fdc.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 14471B2A-E913-47C9-B438-15D37746DFDF.1; Wed, 03 Apr 2024 09:27:16 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b8176c905fdc.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 03 Apr 2024 09:27:16 +0000 X-Received: from AM0PR08MB4289.eurprd08.prod.outlook.com (2603:10a6:208:148::12) by DB9PR08MB8578.eurprd08.prod.outlook.com (2603:10a6:10:3d5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 3 Apr 2024 09:27:14 +0000 X-Received: from AM0PR08MB4289.eurprd08.prod.outlook.com ([fe80::4a5d:48:bf49:a524]) by AM0PR08MB4289.eurprd08.prod.outlook.com ([fe80::4a5d:48:bf49:a524%7]) with mapi id 15.20.7409.042; Wed, 3 Apr 2024 09:27:13 +0000 Message-ID: Date: Wed, 3 Apr 2024 10:27:12 +0100 User-Agent: Mozilla Thunderbird To: "devel@edk2.groups.io" CC: "nd@arm.com" , "sami.mujawar@arm.com" From: "levi.yun" Subject: [edk2-devel] [Question] using Flexible Array Member in Structure. X-ClientProxiedBy: LO4P123CA0199.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a5::6) To AM0PR08MB4289.eurprd08.prod.outlook.com (2603:10a6:208:148::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AM0PR08MB4289:EE_|DB9PR08MB8578:EE_|DU2PEPF00028D04:EE_|AS2PR08MB10250:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 5DllVL+GKzyXleKlK+g9WNNKnf92/lzQ2VKPUVe8k7rhdF0X+eMXxnEXiJ/uvLjjlSgFdiZHaqSiAOBrUpqk2wEsmP/089mgUnur5TNmMoTkTbHrF8b19zjxW/l5sg/XHsDeTaODtQXnkiWCbJsxlQNYTTrvnuqMD8urWRvzxIHLkzOMXMs2NQsm6Np8+Ekxrrwqc6qHjL5e/7ILgMoAja/+owiPoCfaBUKiGD/To1Qv6fUPuTk5J5OH1XEH9sV9CFp5AlKK3g+xPuC8SYaxL1uiYuUmGCNtN+IBb8ok0S23hf1WKFw7v3Fl/NKfLlkj2CMhP6w04GRTMFWBM+Kqwqg0lKPFXODaufPy1dWrsTG6Fcczf0mgoOSM3csh19pwTh33SHCZ7n8LknceqIz+Epo/x8X+bOMnNqjX1IqTmVQwrswlFpNZGWo9KbnvX81+U4uOgJ8TgEw59EyjEOj5rhZQ7/FheIf5aTdWbWz1Zdy1ccIxzfCL9BaoMyO5tXRPDv6JxlFERqOlz8HJTIGgOQJqP4cNnPj5YDzbqLv5arrh/20hGt6co95sgwA3yAgWkcTqVcMt+to1DXVe1VQjkWePZurzqOvk1Z8BGVCCHMUCWw7pmNET3xsk383Oipx0YYi7aCzuxmj22cfH7sZRVfPzrtzjiygqJTlQBCDT4uU= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR08MB4289.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8578 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028D04.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 940e601e-37e2-481a-b4c7-08dc53c0452c X-Microsoft-Antispam-Message-Info: Qs8kIO4Dc4jyFxccr20mwTJR+/kp+eNfV0IcIXlm3gIAesDxHusLJ9d66sT6gXHtlAX14CIIwZW81SMoiU1i0sX1mi+7wYEegaHdhX4Ps5VSHbtqZ9Tt/ajU1SQz8a/h89KFj6/aU6nWBTj6h4nYVSH5KYbPplhHsYljTs5Sgx/JWNBDlmRFX40qqeJAhjxaLauIdwO5HxgxEF7/fMaZZYe7ri7ECuQUvX9fZBi/btaqEsDyw9czJxHnXn1HAucTIlKhEUatI6Yu7ODf7LQp9ye6mMb+J5/EBJ+0H7x/1OQIv0nDhLSoFtAD6mChTKP1tiDa8KlC7RgXlRdNigcvz3fXXEo4iyQ2264TxcJuNQdJsAIWIwxLnOVYfUup0FezZBVk95XyANrSAe9M63yz8c49UPvWPGzQN8T3YvqkGqWKwRyMcEEGN85reJoTE3LrOyByxVkakWiwMkFWQNQwKdPyBH8Rwfpk3Ef9+dwnctj8K7RNtR0r9cIYKBAid6Jvb33Ngj102SKp4Fwx81yB0sWdON+qI8HSxjW1/hkrKP1P30JZ2/upJtpCyBvyAL2L6ZAot+Ud+uh63VH5hm2WJjzyI+iRWyHQVlxl56xYztqmIv+Pt1y/2bzsM3PwKsXsC811A5RFyX/tC9y3iJhiNz9AuTmfwjbNVj4XTuRQ1pvFyV86uwhVotJGPp8NTysm50CaodsvIeloBG97fy2iDdZiOxzCCjL24/K/moRaNtU/IP2bCRxRRHCzmnvwbz91 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2024 09:27:23.8995 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 940e601e-37e2-481a-b4c7-08dc53c0452c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D04.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB10250 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 Apr 2024 02:27:27 -0700 Resent-From: yeoreum.yun@arm.com Reply-To: devel@edk2.groups.io,yeoreum.yun@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: XzWpSo2aF7J0nDVxrD0z2AT5x7686176AA= 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="G/Pt+ukp"; 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 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hello all! while I see the code. I have one question related using Flexible Array=20 Member. For example) /// /// Socket Type Data. /// typedef struct { =C2=A0 EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; =C2=A0 UINT16 SocketIdentifier; =C2=A0 UINT16 Reserved; =C2=A0 // EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[]; } EFI_ACPI_6_4_PMTT_SOCKET_TYPE_DATA; In here, why MemoryDeviceStructure should remain with comments? IIUC, edk2 coding style guide doesn't seem to prevent use of Flexible=20 Array Member which is C99 standard. And consider the compiler used to compile edk2 uses defaults standard=20 above of C99 standard. Couldn't I use the flexible array member like: /// /// Socket Type Data. /// typedef struct { =C2=A0 EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; =C2=A0 UINT16 SocketIdentifier; =C2=A0 UINT16 Reserved; =C2=A0 EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE=C2=A0 MemoryDeviceStructure[= ] } Thanks! -=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 (#117365): https://edk2.groups.io/g/devel/message/117365 Mute This Topic: https://groups.io/mt/105305209/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-