From nobody Tue Feb 10 17:34:43 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+43925+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 1563444342117506.25965712069217; Thu, 18 Jul 2019 03:05:42 -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:05:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g8Lk2hynOxuS2gutifkq471NXD+Fk508uZYpRrPlobJA01dY97QJz0i9aRBXFHG79d0xVRNUjENlyeIzFn60VNbJ00tgIiwchPhNw5GDWyYL6mdIC86BQCI9ffliN7FLu3kl+YA1GP0i1yGEVtMhkDqyGfZ4CY2KeihkVOu2ddnTWBVNYTwoMUibohRINAWF5qAE96wIKH3cw4UvJpGpKGrWqJyFp399kW41TLrwoAewtsfwkU8QxcYStGZrWqNx7K9PU2/rvZ/hLP9jxBTyRUN7j4yLiOsjwe3/8mc7PtlamusnSmjw5VIyIUnnnTkmCV1VzCrklp0Ymz0fm0Pcwg== 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=XalO7w01F4EPs/I/IVSzRAAgBz0y8y9FU3/YJC+cTMI=; b=dfypPTat8NuAgJHar9DRDgfE8kLkt2Fq0IjjmnBYrtiJLWfxPsvT1WbzivBe8J4Rgkkhk+2n/xgOsQ4yvQvnjAQH7IAEV4Mb1TdI5AN98tUjV5D1IEqsVQ4XttE80ApHw3+cWKvVW8ntk/7EKne5IwRMaFFDwsQndQA7GlBNGD2/MKIj9m7aMB8u3UYLdqqfrSlWRxaQP+aD0DSRWfY+7jq9P80qYZy+JUxH2uWs0G8PW/rYpTXlyeWSajSXsgylxoQV87ocnnUKkTHvDRjHh9JG5s1cfh74YxRhwc7P99HGap6+xwoYeI0H9QgWEQODoB4FhrxMjZdSKVZBkF6+DA== 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 VI1PR08CA0157.eurprd08.prod.outlook.com (2603:10a6:800:d1::11) by AM0PR08MB4945.eurprd08.prod.outlook.com (2603:10a6:208:157::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Thu, 18 Jul 2019 10:05:36 +0000 X-Received: from DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::204) by VI1PR08CA0157.outlook.office365.com (2603:10a6:800:d1::11) 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:05: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+43925+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 DB5EUR03FT021.mail.protection.outlook.com (10.152.20.238) 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:05:34 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) 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 4/8] ShellPkg: acpiview: SRAT: Remove redundant forward declarations Date: Thu, 18 Jul 2019 11:04:58 +0100 Message-ID: <20190718100502.24688-5-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: 41e81945-80b5-403d-46c0-08d70b677999 X-MS-TrafficTypeDiagnostic: AM0PR08MB4945: X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: ol47iPM8wv6EqAUAOYoF+5ci4zfC3aw+CcV8P06jpuymuR7bnoDZT3Sa1sKKX7uuhjZTpZwybqQuuK1ht5FVBO4g4M3Z929zfzhO06HN256LH2SyuNTdlJd7QAFbmnrlUVTWhlsg4NrtmmomMgBOb+N2P/bXN9lXC0OHApN4DAqffN+j+5YOCePkiRS26VeNYCrWampA22M1bIjBJmNqboedUK1xRR0zoMOH2vs/k25U2AGzEbYbQOrunTnRlkU09oc9mzIo3G5arPLe0xn5kxknDLGxgzdY1uhHw+lLE5W+p6CPpmiCgFlpjcfnaFgTe0qtWzU06Vj6YLKkkBp2f9FHu8phP/sTsXPEfr83Oauxo8oRvD6gPAeCM6r2ZHkq2myuoORmtVJfIWSucdzjYBzNKGrveiEcSvUh39EXGmE= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2019 10:05:34.5719 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 41e81945-80b5-403d-46c0-08d70b677999 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: AM0PR08MB4945 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=1563444341; bh=++qJftfMS+EmIXSYE1LHMZb4DhMIsQrmQBm4OOJGTBY=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=DRRGmEQX9QqbYJUWLEGkx+88xrL8Noo6xEUAFs975HfZngJi8xhMXt7LSGChcgBZ+XM TSkjF1iVnQTQnqQwjxvoB3uDIR++ZfldLd0IkZ5bMggAp4Hv+Ok+AFkbkMqCJiSBiCi1a nvbpXmzr+gC06lhKa3xETx+ZkFJE7Gj5vzQ= 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/Srat/SratParser.c | 6= 4 ++++++-------------- 1 file changed, 18 insertions(+), 46 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/Srat= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratPa= rser.c index 075ff2a141a82b522e8aaedb7ad79249aaf5eaac..03d28d52842040e4872e204fc10= ae3dba7861936 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c @@ -1,7 +1,7 @@ /** @file SRAT table parser =20 - Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. + Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Reference(s): @@ -32,7 +32,13 @@ EFIAPI ValidateSratReserved ( IN UINT8* Ptr, IN VOID* Context - ); + ) +{ + if (*(UINT32*)Ptr !=3D 1) { + IncrementErrorCount (); + Print (L"\nERROR: Reserved should be 1 for backward compatibility.\n"); + } +} =20 /** This function traces the APIC Proximity Domain field. @@ -44,9 +50,16 @@ STATIC VOID EFIAPI DumpSratApicProximity ( - IN CONST CHAR16* Format, - IN UINT8* Ptr - ); + IN CONST CHAR16* Format, + IN UINT8* Ptr + ) +{ + UINT32 ProximityDomain; + + ProximityDomain =3D Ptr[0] | (Ptr[1] << 8) | (Ptr[2] << 16); + + Print (Format, ProximityDomain); +} =20 /** An ACPI_PARSER array describing the SRAT Table. @@ -139,47 +152,6 @@ STATIC CONST ACPI_PARSER SratX2ApciAffinityParser[] = =3D { {L"Reserved", 4, 20, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** This function validates the Reserved field in the SRAT table header. - - @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 -ValidateSratReserved ( - IN UINT8* Ptr, - IN VOID* Context - ) -{ - if (*(UINT32*)Ptr !=3D 1) { - IncrementErrorCount (); - Print (L"\nERROR: Reserved should be 1 for backward compatibility.\n"); - } -} - -/** - This function traces the APIC Proximity Domain field. - - @param [in] Format Format string for tracing the data. - @param [in] Ptr Pointer to the start of the buffer. -**/ -STATIC -VOID -EFIAPI -DumpSratApicProximity ( - IN CONST CHAR16* Format, - IN UINT8* Ptr - ) -{ - UINT32 ProximityDomain; - - ProximityDomain =3D Ptr[0] | (Ptr[1] << 8) | (Ptr[2] << 16); - - Print (Format, ProximityDomain); -} - /** This function parses the ACPI SRAT table. When trace is enabled this function parses the SRAT table and -- '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 (#43925): https://edk2.groups.io/g/devel/message/43925 Mute This Topic: https://groups.io/mt/32513484/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-