From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=T5AYJHGd; spf=pass (domain: arm.com, ip: 40.107.3.83, mailfrom: krzysztof.koch@arm.com) 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XsgML4vFHJ5VbN+aUHbLX+ZSf06+82jHp/fBPCn1/PE=; b=T5AYJHGdJ5oPHsOgyOecyah6fhz6oVHRL3YbomQ1BAyOU/QjCARTNrArg2qQhKwComccuHrnuxjUO9A9fjiQydAGC18fm70v3BcIQ5PbCZSROZ2aXleW0JRH+8sm1cy5SYA2A5u+NFRmO2R/O6WJgW95ueAOOnXZ/bBv3QeJxvw= 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 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 Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) 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 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 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 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: [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> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20190718100502.24688-1-krzysztof.koch@arm.com> References: <20190718100502.24688-1-krzysztof.koch@arm.com> Return-Path: Krzysztof.Koch@arm.com MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(346002)(136003)(396003)(39860400002)(376002)(2980300002)(189003)(199004)(63350400001)(26005)(76176011)(54906003)(186003)(63370400001)(7696005)(426003)(8936002)(16586007)(2351001)(81156014)(336012)(81166006)(50226002)(86362001)(446003)(478600001)(316002)(2906002)(50466002)(8676002)(11346002)(2616005)(476003)(126002)(48376002)(68736007)(486006)(70586007)(305945005)(44832011)(51416003)(70206006)(47776003)(1076003)(53416004)(5660300002)(356004)(6666004)(36756003)(4326008)(6916009)(53936002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0801MB1842;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7aeb3842-b835-4f15-94ec-08d70b679d49 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328);SRVR:AM5PR0801MB1842; X-MS-TrafficTypeDiagnostic: AM5PR0801MB1842: X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 01026E1310 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 Content-Type: text/plain 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 --- Notes: v1: - remove redundant forward function declarations [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c | 58 +++++--------------- 1 file changed, 14 insertions(+), 44 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c index 93f78e1a9786ed53f6b5529f478b72a220b4f8df..0461205b4f8bc02aa11ab1db1d0deb73bce053b7 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 != 0) { + IncrementErrorCount (); + Print (L"\nERROR: IORT ID Mapping count must be zero."); + } +} /** 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 != 0) { + IncrementErrorCount (); + Print (L"\nERROR: IORT ID Mapping offset must be zero."); + } +} /** Helper Macro for populating the IORT Node header in the ACPI_PARSER array. @@ -210,48 +222,6 @@ STATIC CONST ACPI_PARSER IortNodePmcgParser[] = { {L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}, }; -/** - 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 != 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 != 0) { - IncrementErrorCount (); - Print (L"\nERROR: IORT ID Mapping offset must be zero."); - } -} - /** This function parses the IORT Node Id Mapping array. -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'