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=CKBX6D3d; spf=pass (domain: arm.com, ip: 40.107.6.46, mailfrom: krzysztof.koch@arm.com) 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 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=kEavClE2mhVFG2lg7ChxJmoEd58ZJRQDL63NDyqx7Qw=; b=CKBX6D3d4vqkXvLZIhEqB0zFjNqgWZdTEssjUyrCgZOQbkug4kuKybzfl+ktRfcxGvpjAegH4hZJUWLBQXt+YnJzSprRjPsvJ9yCAtpcAF1+wf6ZzFxhgeE35Ruh2+KtoQCEcaTWFuSjXnMN/X0G28g/b/nDT8A4PLrYnBQO2G8= 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 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 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 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 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 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 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: [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> 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)(136003)(376002)(396003)(39860400002)(346002)(2980300002)(189003)(199004)(476003)(446003)(11346002)(70206006)(70586007)(54906003)(478600001)(47776003)(2616005)(8676002)(8936002)(2351001)(126002)(5660300002)(53936002)(50226002)(186003)(336012)(50466002)(86362001)(53416004)(2906002)(81156014)(316002)(26005)(48376002)(81166006)(76176011)(426003)(4326008)(16586007)(51416003)(7696005)(305945005)(63350400001)(1076003)(6666004)(356004)(36756003)(44832011)(68736007)(486006)(63370400001)(6916009);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR08MB4955;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: 6c89aa68-0dd7-4d7f-d24c-08d70b679536 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328);SRVR:DB8PR08MB4955; X-MS-TrafficTypeDiagnostic: DB8PR08MB4955: X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 01026E1310 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 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/Dbg2/Dbg2Parser.c | 62 +++++--------------- 1 file changed, 16 insertions(+), 46 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c index 8de5ebf74775bab8e765849cba6ef4eb6f659a5a..1efcbd40f86efdabed2152540a415db8a950fb71 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; /** - This function Validates the NameSpace string length. + 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 @@ -37,24 +37,23 @@ STATIC VOID EFIAPI ValidateNameSpaceStrLen ( - IN UINT8* Ptr, - IN VOID* Context - ); + IN UINT8* Ptr, + IN VOID* Context + ) +{ + UINT16 NameSpaceStrLen; -/** - This function parses the debug device information structure. + NameSpaceStrLen = *(UINT16*)Ptr; - @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 = %d. If no Namespace device exists, " \ + L"NamespaceString[] must contain a period '.'", + NameSpaceStrLen + ); + } +} /// An ACPI_PARSER array describing the ACPI DBG2 table. STATIC CONST ACPI_PARSER Dbg2Parser[] = { @@ -91,35 +90,6 @@ STATIC CONST ACPI_PARSER DbgDevInfoParser[] = { (VOID**)&AddrSizeOffset, NULL, NULL} }; -/** - 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 = *(UINT16*)Ptr; - - if (NameSpaceStrLen < 2) { - IncrementErrorCount (); - Print ( - L"\nERROR: NamespaceString Length = %d. If no Namespace device exists,\n" - L" then NamespaceString[] must contain a period '.'", - NameSpaceStrLen - ); - } -} - /** This function parses the debug device information structure. -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'