From nobody Tue Feb 10 08:03:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43932+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1563444401602254.9028707694431; Thu, 18 Jul 2019 03:06:41 -0700 (PDT) Return-Path: X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.83]) by groups.io with SMTP; Thu, 18 Jul 2019 03:06:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e1LNWEQ1Cv9mItdqHW/fw+bdhyBOkpC8OcD/Fb6hsYzqLJPuqYF+P7g+p5coy0wlrv5tDsFfPC+oW1rEOd65xP1dK266yPKVD0w4z6h/BO1TDfRoT4ha13ecqNauPmK3nm60KpiB6ln2tt13iDCQyG3RmyISAs/ee8LRc+gINAfaexsjcNVj1CYXVBvRTO3ovlXZFUbsNj/BFnLholSy9SAWK8q44cj9lBCc0hE2QaMgUgL4IHafuN/h6SP7/vrqAUWEw6z0wnFFdn3dHjt1QF8mWBPnVE6OespoBqPTBA/JLHbHFwtbCRvNx1qu/1thbe5KNCCaS6rA+/mTts5RDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XsgML4vFHJ5VbN+aUHbLX+ZSf06+82jHp/fBPCn1/PE=; b=dHmFGLZ2w0CgczDXJvXMZTSI9SWB5d5/O/dUF2cBLBjPgfY6W0Oy88G17sxL7FPv16JeOvSCNf2zlq77Wz0BmAO+5jPWYwjqi6TJoawYWm3qWc0yaXgj1dYZWpnvYbDOzGW5WriP0FFXiQ2inbsKHGMoONkrLybTqTRF9cIOkZl87+2RwQRzQiwB825+/EleWy0x6ZjZHA9KCVPx/cBmMrmNWXn2+C/eBbuFbInD/yn/VnNYEM5HJ54IJzmvS9anaRxK0+MmeipvdZfTAiUV/xeAwwkHpkPOb9G8oDU/VOYKS6eqXGes7quCNdAqUyuBvZauLSVNC9shHcHLiyHA6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=temperror (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com;dmarc=temperror action=none header.from=arm.com;dkim=none (message not signed);arc=none X-Received: from VI1PR08CA0263.eurprd08.prod.outlook.com (2603:10a6:803:dc::36) by AM5PR0801MB1842.eurprd08.prod.outlook.com (2603:10a6:203:3c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.12; Thu, 18 Jul 2019 10:06:36 +0000 X-Received: from DB5EUR03FT004.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::206) by VI1PR08CA0263.outlook.office365.com (2603:10a6:803:dc::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2094.11 via Frontend Transport; Thu, 18 Jul 2019 10:06:36 +0000 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43932+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT004.mail.protection.outlook.com (10.152.20.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2052.18 via Frontend Transport; Thu, 18 Jul 2019 10:06:34 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Thu, 18 Jul 2019 10:05:14 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Thu, 18 Jul 2019 10:05:13 +0000 X-Received: from E119924.Arm.com (10.1.199.124) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Thu, 18 Jul 2019 10:05:13 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [edk2-devel] [PATCH v1 6/8] ShellPkg: acpiview: IORT: Remove redundant forward declarations Date: Thu, 18 Jul 2019 11:05:00 +0100 Message-ID: <20190718100502.24688-7-krzysztof.koch@arm.com> In-Reply-To: <20190718100502.24688-1-krzysztof.koch@arm.com> References: <20190718100502.24688-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7aeb3842-b835-4f15-94ec-08d70b679d49 X-MS-TrafficTypeDiagnostic: AM5PR0801MB1842: X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: zdwAK57VbImy5BT1SWOimfOW98pfILZcvMq//rEJrto4c7f2opkMwJfvcHz0LZJxbH65lm2iReTw9K6TlJp01bQylzdRhykxFLeMgpXAGsv6/79AvvrAXTVBBnK8EmKw3p2Oz8HTg3x2FBXd48Pam85I924jT+Qaro7vb4UcP/xdrQ40wN7rGgvNulB0GXVnpaxUVeht4indx1z2FPsfUBoKaV48UaE6btJWZaNmyRMtZR2ukzXsZqKXJ2E3x9wGq51o5l0dx3Nq+wF9sgn2fI8kigTpSzmlmuQotLkKxasVRUbKUyb80VpQhLQXQG5zDANXKuYx7pyKLrVq5Oqv6TPLjAX6EfnZuFPFqaV6vXbIFp7hpBGeJFMWr+bni+vZVfzORfe0Wv/v1LGFkehMipI7vs17Fc8AD05O5ECi7xs= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2019 10:06:34.4466 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7aeb3842-b835-4f15-94ec-08d70b679d49 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[40.67.248.234];Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1842 Precedence: Bulk List-Unsubscribe: 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,krzysztof.koch@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563444401; bh=/g/cxwC4wnWhcg4B5VkBhOSg7X9yKqnb2eArK0jQpXE=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Z5iSIOh01IprP6GmgWA1x1l1P6BrBfluvW7EsrRfeuithjb9drYrPnAbCE74hxZq9QW jznsAvdidCo2G0/+CWrIhOdJsVcgX66qp5DQVk0ySG9nEGe6tjTDtBTSsi86sz+IqHPC0 VQdxTDR5u59OoOl1kHtlIAStX7KMe8Q44Is= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch Reviewed-by: Alexei Fedorov --- Notes: v1: - remove redundant forward function declarations [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c | 5= 8 +++++--------------- 1 file changed, 14 insertions(+), 44 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/Iort= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortPa= rser.c index 93f78e1a9786ed53f6b5529f478b72a220b4f8df..0461205b4f8bc02aa11ab1db1d0= deb73bce053b7 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c @@ -45,7 +45,13 @@ EFIAPI ValidateItsIdMappingCount ( IN UINT8* Ptr, IN VOID* Context - ); + ) +{ + if (*(UINT32*)Ptr !=3D 0) { + IncrementErrorCount (); + Print (L"\nERROR: IORT ID Mapping count must be zero."); + } +} =20 /** This function validates the ID Mapping array offset for the ITS node. @@ -60,7 +66,13 @@ EFIAPI ValidateItsIdArrayReference ( IN UINT8* Ptr, IN VOID* Context - ); + ) +{ + if (*(UINT32*)Ptr !=3D 0) { + IncrementErrorCount (); + Print (L"\nERROR: IORT ID Mapping offset must be zero."); + } +} =20 /** Helper Macro for populating the IORT Node header in the ACPI_PARSER arra= y. @@ -210,48 +222,6 @@ STATIC CONST ACPI_PARSER IortNodePmcgParser[] =3D { {L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}, }; =20 -/** - This function validates the ID Mapping array count for the ITS node. - - @param [in] Ptr Pointer to the start of the field data. - @param [in] Context Pointer to context specific information e.g. this - could be a pointer to the ACPI table header. -**/ -STATIC -VOID -EFIAPI -ValidateItsIdMappingCount ( - IN UINT8* Ptr, - IN VOID* Context - ) -{ - if (*(UINT32*)Ptr !=3D 0) { - IncrementErrorCount (); - Print (L"\nERROR: IORT ID Mapping count must be zero."); - } -} - -/** - This function validates the ID Mapping array offset for the ITS node. - - @param [in] Ptr Pointer to the start of the field data. - @param [in] Context Pointer to context specific information e.g. this - could be a pointer to the ACPI table header. -**/ -STATIC -VOID -EFIAPI -ValidateItsIdArrayReference ( - IN UINT8* Ptr, - IN VOID* Context - ) -{ - if (*(UINT32*)Ptr !=3D 0) { - IncrementErrorCount (); - Print (L"\nERROR: IORT ID Mapping offset must be zero."); - } -} - /** This function parses the IORT Node Id Mapping array. =20 -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=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 (#43932): https://edk2.groups.io/g/devel/message/43932 Mute This Topic: https://groups.io/mt/32513494/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-