From nobody Tue Feb 10 06:07:13 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+43930+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 1563444386345642.241414107225; Thu, 18 Jul 2019 03:06:26 -0700 (PDT) Return-Path: X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.46]) by groups.io with SMTP; Thu, 18 Jul 2019 03:06:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XYIs2spB2L8KvCTApmcwJaccKEQo4PupJ60O21jkFCgGuBuxLTcjFO2D3QvtYybDa5Jj986ucyUAgYrEgsgGP6y5hkZK6CAph1ZHBTLh9wB4xKuyc9XgSMQ8itG4iTB8dUkNMNnUW0xe3GiYIV6qwBFsOZWJUbUw95ahkBUBuSBS7NKtj/CKJaBA44xloeQnmVCGU3bv15U/zZ/+TjwqSxnoZlQmmVl5R3QmUJMqqIY8N6X3kIIo7cT++3BC7XjzQ47+ci2VDgcHZVBQeslNpAPddQ9VQuEIt8cHuFKlMwMSjDhFYZtwzZ8obza4M9QGz+FxY1wc10DlCY944KS8nw== 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=kEavClE2mhVFG2lg7ChxJmoEd58ZJRQDL63NDyqx7Qw=; b=W6dUjcVYuzkqlydAR/zULqo2xUGDgvLD5g6jXktqLdeGndJXPhxwjKLLk/mofg0s7AfEXFh6n7qabF5+6s/jHBdINeD6NjehPj7+mLLfbT2HKXhjkwM+wLvsvX2OGdf9h+ImbBeuAFqYXQN4SWkBymChqEChea4r1e0S4+zbvws86Y70gQ8qfdajCgMGhphV5lZqtV9NsRwRQaJpLxCBs3WNgsgqwyt4k46LWRsld3+sFXAj23F5T5IMrjN7+za/rqT7BWkRrrHHZ1Q2n6v6GwT8VXvQDeN4y2BUpycA3rtQcNrfT10w16GS0Wd7BayvUoBG/aBxXaW/uv6YWMFL3A== 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 VI1PR08CA0116.eurprd08.prod.outlook.com (2603:10a6:800:d4::18) by DB8PR08MB4955.eurprd08.prod.outlook.com (2603:10a6:10:38::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.14; Thu, 18 Jul 2019 10:06:22 +0000 X-Received: from DB5EUR03FT061.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::208) by VI1PR08CA0116.outlook.office365.com (2603:10a6:800:d4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2094.12 via Frontend Transport; Thu, 18 Jul 2019 10:06:21 +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+43930+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 DB5EUR03FT061.mail.protection.outlook.com (10.152.21.234) 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:20 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) 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:14 +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:14 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [edk2-devel] [PATCH v1 8/8] ShellPkg: acpiview: DBG2: Remove redundant forward declarations Date: Thu, 18 Jul 2019 11:05:02 +0100 Message-ID: <20190718100502.24688-9-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: 6c89aa68-0dd7-4d7f-d24c-08d70b679536 X-MS-TrafficTypeDiagnostic: DB8PR08MB4955: X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: C1dpWDLIjd62vfiRfALvddOQpmGKAfb8yiCaCOYANGU4//v3Lyc71vVnkYraS6Gow8XTmnGDus1HRaR8f3TcqTaUlAj/I2u02sbU85mNTH7/6815Hhll9NEh426qhH+m3bSuxl0/9cIbxl0pbVbhoUyHE9cuiJNr7nC1kBUu7ftP1va0Fdd8DzpQYWk7CsNt/aOJas34Q0Eo9jU6rvAYPY9dJzbMMtxnr4t2Dy+iuRA0dBPqslhQ0MJi94OLkxFFJ7rFgkrauiNWgmfI6KiV7b1mI8m0tELAKbXqrX79nh/nXSS1NE8FPK055adkb8w35iSCeKg8m8S3R1BjOtSAwPMYWS6pQ/zQhuLKm3LTXsQhNAsoXbetNfJLEQBTvSg9nha7LeqiW12HHF0VTdq5yd910CqAXSbieEXDhm5pjSc= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2019 10:06:20.9029 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6c89aa68-0dd7-4d7f-d24c-08d70b679536 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: DB8PR08MB4955 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=1563444385; bh=N2WdjvjFXocF4C0y0rEgbLvdjlRa9sYPCHxvcACOe2g=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=s8/WOe3EZOClUZ40VsPlyAWA1nGmPqQMcthGiK3Lfnb2LXBIQTLrg7yONdOxHr0BvpZ l8qDmvT/BRv+t9wcPzztkPYac1VV676axbZWEHcE2JrPT+hH9xKGu+LzA/F3abiLxyXMw +bTaEZoThWDI83D+VZG3kh7jzySK2QD0wtE= 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/Dbg2/Dbg2Parser.c | 6= 2 +++++--------------- 1 file changed, 16 insertions(+), 46 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Pa= rser.c index 8de5ebf74775bab8e765849cba6ef4eb6f659a5a..1efcbd40f86efdabed2152540a4= 15db8a950fb71 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c @@ -27,7 +27,7 @@ STATIC CONST UINT16* AddrSizeOffset; STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 /** - This function Validates the NameSpace string length. + This function validates the NameSpace string length. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Context Pointer to context specific information e.g. this @@ -37,24 +37,23 @@ STATIC VOID EFIAPI ValidateNameSpaceStrLen ( - IN UINT8* Ptr, - IN VOID* Context - ); + IN UINT8* Ptr, + IN VOID* Context + ) +{ + UINT16 NameSpaceStrLen; =20 -/** - This function parses the debug device information structure. + NameSpaceStrLen =3D *(UINT16*)Ptr; =20 - @param [in] Ptr Pointer to the start of the buffer. - @param [out] Length Pointer in which the length of the debug - device information is returned. -**/ -STATIC -VOID -EFIAPI -DumpDbgDeviceInfo ( - IN UINT8* Ptr, - OUT UINT32* Length - ); + if (NameSpaceStrLen < 2) { + IncrementErrorCount (); + Print ( + L"\nERROR: NamespaceString Length =3D %d. If no Namespace device exi= sts, " \ + L"NamespaceString[] must contain a period '.'", + NameSpaceStrLen + ); + } +} =20 /// An ACPI_PARSER array describing the ACPI DBG2 table. STATIC CONST ACPI_PARSER Dbg2Parser[] =3D { @@ -91,35 +90,6 @@ STATIC CONST ACPI_PARSER DbgDevInfoParser[] =3D { (VOID**)&AddrSizeOffset, NULL, NULL} }; =20 -/** - This function validates the NameSpace string length. - - @param [in] Ptr Pointer to the start of the buffer. - @param [in] Context Pointer to context specific information e.g. this - could be a pointer to the ACPI table header. -**/ -STATIC -VOID -EFIAPI -ValidateNameSpaceStrLen ( - IN UINT8* Ptr, - IN VOID* Context - ) -{ - UINT16 NameSpaceStrLen; - - NameSpaceStrLen =3D *(UINT16*)Ptr; - - if (NameSpaceStrLen < 2) { - IncrementErrorCount (); - Print ( - L"\nERROR: NamespaceString Length =3D %d. If no Namespace device exi= sts,\n" - L" then NamespaceString[] must contain a period '.'", - NameSpaceStrLen - ); - } -} - /** This function parses the debug device information structure. =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 (#43930): https://edk2.groups.io/g/devel/message/43930 Mute This Topic: https://groups.io/mt/32513492/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-