From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.66]) by mx.groups.io with SMTP id smtpd.web12.21080.1593444039182847033 for ; Mon, 29 Jun 2020 08:20:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Sk3g7lXH; spf=pass (domain: arm.com, ip: 40.107.20.66, mailfrom: tomas.pilar@arm.com) 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=ss5B2qsN8fCts2U8AODRCEzGLaeaHYDWBFFl7SfZbn0=; b=Sk3g7lXH6FLKNNn0YA4Zkvh6S6u6Ovlr8zBF9Hz/ufzYtEeikCiooYg49ESfxDOHlaNDm5j7lw8h65OslJZJ4wa5e38wgdFLy2n9VjUPZJc461lbc1/UTpEuaniHDZr4tfpEvhPR8NQ3qYK/KVuElxZj3vgcLWZCKbPzrhlV4sE= Received: from AM5P194CA0020.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::30) by AM6PR08MB4037.eurprd08.prod.outlook.com (2603:10a6:20b:a5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21; Mon, 29 Jun 2020 15:20:35 +0000 Received: from VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:8f:cafe::25) by AM5P194CA0020.outlook.office365.com (2603:10a6:203:8f::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Mon, 29 Jun 2020 15:20:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT013.mail.protection.outlook.com (10.152.19.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Mon, 29 Jun 2020 15:20:35 +0000 Received: ("Tessian outbound fcb8da16d5bd:v60"); Mon, 29 Jun 2020 15:20:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 19d8dc579434bb8d X-CR-MTA-TID: 64aa7808 Received: from c6f0cd3e7385.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FD77A156-44D0-441B-8F3C-E9B4FC14F57B.1; Mon, 29 Jun 2020 15:20:29 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c6f0cd3e7385.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 29 Jun 2020 15:20:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WEBOoE2GaaX+qABZ5roTnlMz/uC3BP5VTyrUqaipU06lgMFKhfxSiWZ3mjMDxhaJOWx0IyKK2jvcz0rV5H7ohXMr3sjoD8sPuEMRhfia67SKDJ7HgjUZYOSewo5AkajO5I2B5VIYR9M3R+6ENJ1yjZLTSsVB8O6FCiu9y5is3D9XYQr1aTxQ+GzMxJT4yeL6zZVXcPQWCan665kgNkC0BaBtMwy18+EHK3eFGqysUiM4EwDNI0LFbiUOOrvKwFCJX7fvByELeR9+4UQTdITKNRUjCFjjYwC7eV18nMrR4oZpVZ5uDLk/cZwAlxsbeBwdmuyDyZF9NB196waffDCWNw== 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=ss5B2qsN8fCts2U8AODRCEzGLaeaHYDWBFFl7SfZbn0=; b=aPmcERy+pQWJOKHcgGwig6zgp927PW/b8rC0PanMyoExT2CM5A1mEq9lu1riztvl97i6VwGKUO9ladWOnf41bf7J6r0yKH/qAqBBb7iF6c5oGMUbsCKR6e/8w7BbhoBSSv16fgTTjL4Q+GRVBM6UT1C3fQrGj1vPiIkPlbYc7RCYl5BZeWBB/RZn0ICEXpL+pZd85MVhuERzubdaoEEqVDjDNRcujRUjWTExocXmhAchyFGdEEQ0ZqxekWFy1pqdsOIMn7GfGCposZKZanFy2m8ZEBAmnP0fochvb8L+WbXqjbhPYt717nThoNSZsqhzx+5u43CEiCD//LaVwv8bZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass 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=ss5B2qsN8fCts2U8AODRCEzGLaeaHYDWBFFl7SfZbn0=; b=Sk3g7lXH6FLKNNn0YA4Zkvh6S6u6Ovlr8zBF9Hz/ufzYtEeikCiooYg49ESfxDOHlaNDm5j7lw8h65OslJZJ4wa5e38wgdFLy2n9VjUPZJc461lbc1/UTpEuaniHDZr4tfpEvhPR8NQ3qYK/KVuElxZj3vgcLWZCKbPzrhlV4sE= Received: from DB8PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:10:a0::22) by AM7PR08MB5447.eurprd08.prod.outlook.com (2603:10a6:20b:10b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.24; Mon, 29 Jun 2020 15:20:27 +0000 Received: from DB5EUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:a0:cafe::ab) by DB8PR09CA0009.outlook.office365.com (2603:10a6:10:a0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Mon, 29 Jun 2020 15:20:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT035.mail.protection.outlook.com (10.152.20.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Mon, 29 Jun 2020 15:20:27 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Mon, 29 Jun 2020 15:20:27 +0000 Received: from localhost.localdomain (10.57.4.19) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Mon, 29 Jun 2020 15:20:26 +0000 From: "Tomas Pilar (tpilar)" To: CC: , , Ray Ni , "Zhichao Gao" Subject: [PATCH 2/8] ShellPkg/AcpiView: Declutter error counters Date: Mon, 29 Jun 2020 16:20:02 +0100 Message-ID: <20200629152008.685-3-Tomas.Pilar@arm.com> X-Mailer: git-send-email 2.24.1.windows.2 In-Reply-To: <20200629152008.685-1-Tomas.Pilar@arm.com> References: <20200629152008.685-1-Tomas.Pilar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(346002)(376002)(396003)(46966005)(6916009)(1076003)(86362001)(186003)(70206006)(36756003)(6666004)(5660300002)(70586007)(26005)(83380400001)(336012)(356005)(426003)(2616005)(82310400002)(4326008)(54906003)(478600001)(81166007)(8676002)(8936002)(316002)(47076004)(2906002)(82740400003);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 439f97aa-455c-4b94-dd57-08d81c3ff8a3 X-MS-TrafficTypeDiagnostic: AM7PR08MB5447:|AM6PR08MB4037: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:107;OLM:107; X-Forefront-PRVS: 044968D9E1 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +NMoDG8vJgUR1s8bcmaQdBkPxF5Oh24Qbo+VYGks6X7GCUZv0wVvCuEx2G/vduwA6Z86TM88olqvvtBFRJDRDJv8Uk8uzkogpViAse2CasHtj6PxQkY5R59dhuPGoiihQwv6pyw6adpag6hOxIzSHG2JEGcifNYq3yYDgM8j/ai+LBkYqkyT0V9cXOfL1ny0695s4BU9ZttvxF2VsbUyqCph9l3vV6sd3+15xuO715UeGP/CWWFkwybwlz7GWL3rsTyJ8tP5sMKk4JT2eAxdSMm80QJyfaB9SMYsU4ApHkB2ylCsSOug7Zxf0qvkGU7C4w9z54zXycn3LFWkJ3wr+noXvZPiIEiRyJOCbQVo6+78U7qUi6poIjfthdaXU0s3MMyWmHopmem3PJzL+MKrHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5447 Return-Path: Tomas.Pilar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(4636009)(46966005)(82310400002)(81166007)(2906002)(47076004)(8676002)(70206006)(4326008)(2616005)(186003)(6916009)(54906003)(1076003)(70586007)(426003)(26005)(107886003)(36906005)(8936002)(5660300002)(36756003)(498600001)(86362001)(6666004)(83380400001)(336012);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 08cebd74-ba67-4cb0-4ad5-08d81c3ff41e X-Forefront-PRVS: 044968D9E1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BvtlpHG4eFe5OYKnUxVrGo8ojIZHQXIrtqYnbQbdBsXKCvvnxWVbHqFF1G60r5z5Z8p3ESplr71H0TBM6MgaS0Y6UnsCfADEumyABFvLLAm+fM6VXRO+WROk/lJjZxoD6FgFJVHQZpConVovp+YZnL4zzfPwizaZWv0LmjuxrmfAiW8KFxX8CtFzdD+dj0MPhxUQqHQbCKY7NDw5f1VYeCG86OGqV+0eDvg6kHCNxLEq9CDXfB6YWArTb94n2PE6FroUCK46twdKlMXY0c4RcimsYyYbaZj70IZL2jOLjxfNEi6Bms7cYDsCmezvEhuuAhGQ1PNAFt+n0oXaAfydexjLFuWxLfSlCZuvtJwinPBw2K5zb1PRJR0rH+H0edg0YKjMB817Egj/yG7iM4jaMg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2020 15:20:35.1803 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 439f97aa-455c-4b94-dd57-08d81c3ff8a3 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4037 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Remove superfluous accessor methods for error and warning counters. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Tomas Pilar --- .../UefiShellAcpiViewCommandLib/AcpiParser.c | 54 ++----------------- .../UefiShellAcpiViewCommandLib/AcpiParser.h | 4 ++ .../UefiShellAcpiViewCommandLib/AcpiView.c | 12 ++--- .../UefiShellAcpiViewCommandLib/AcpiView.h | 36 ------------- 4 files changed, 14 insertions(+), 92 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index 3a029b01cc20..7017fa93efae 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -13,8 +13,10 @@ #include "AcpiViewConfig.h" =20 STATIC UINT32 gIndent; -STATIC UINT32 mTableErrorCount; -STATIC UINT32 mTableWarningCount; + +// Publicly accessible error and warning counters. +UINT32 mTableErrorCount; +UINT32 mTableWarningCount; =20 STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 @@ -25,54 +27,6 @@ STATIC CONST ACPI_PARSER AcpiHeaderParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo) }; =20 -/** - This function resets the ACPI table error counter to Zero. -**/ -VOID -ResetErrorCount ( - VOID - ) -{ - mTableErrorCount =3D 0; -} - -/** - This function returns the ACPI table error count. - - @retval Returns the count of errors detected in the ACPI tables. -**/ -UINT32 -GetErrorCount ( - VOID - ) -{ - return mTableErrorCount; -} - -/** - This function resets the ACPI table warning counter to Zero. -**/ -VOID -ResetWarningCount ( - VOID - ) -{ - mTableWarningCount =3D 0; -} - -/** - This function returns the ACPI table warning count. - - @retval Returns the count of warning detected in the ACPI tables. -**/ -UINT32 -GetWarningCount ( - VOID - ) -{ - return mTableWarningCount; -} - /** This function increments the ACPI table error counter. **/ diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h index f81ccac7e118..84eae61c8889 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h @@ -16,6 +16,10 @@ /// that allows us to process the log options. #define RSDP_TABLE_INFO SIGNATURE_32('R', 'S', 'D', 'P') =20 +// Publicly accessible error and warning counters. +extern UINT32 mTableErrorCount; +extern UINT32 mTableWarningCount; + /** This function increments the ACPI table error counter. **/ diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index d2c14d5b8f5a..e25e0712948b 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -199,8 +199,8 @@ AcpiView ( mBinTableCount =3D 0; =20 // Reset The error/warning counters - ResetErrorCount (); - ResetWarningCount (); + mTableErrorCount =3D 0; + mTableWarningCount =3D 0; =20 // Search the table for an entry that matches the ACPI Table Guid FoundAcpiTable =3D FALSE; @@ -278,7 +278,7 @@ AcpiView ( Print (L"\nTable Statistics:\n"); =20 if (mConfig.ColourHighlighting) { - PrintAttribute =3D (GetErrorCount () > 0) ? + PrintAttribute =3D ((mTableErrorCount) > 0) ? EFI_TEXT_ATTR ( EFI_RED, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4) @@ -286,10 +286,10 @@ AcpiView ( OriginalAttribute; gST->ConOut->SetAttribute (gST->ConOut, PrintAttribute); } - Print (L"\t%d Error(s)\n", GetErrorCount ()); + Print (L"\t%d Error(s)\n", mTableErrorCount); =20 if (mConfig.ColourHighlighting) { - PrintAttribute =3D (GetWarningCount () > 0) ? + PrintAttribute =3D (mTableWarningCount > 0) ? EFI_TEXT_ATTR ( EFI_RED, ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4) @@ -298,7 +298,7 @@ AcpiView ( =20 gST->ConOut->SetAttribute (gST->ConOut, PrintAttribute); } - Print (L"\t%d Warning(s)\n", GetWarningCount ()); + Print (L"\t%d Warning(s)\n", mTableWarningCount); =20 if (mConfig.ColourHighlighting) { gST->ConOut->SetAttribute (gST->ConOut, OriginalAttribute); diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h index d5b95f5ee707..6fefe98a4463 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h @@ -23,42 +23,6 @@ **/ #define RSDP_LENGTH_OFFSET 20 =20 -/** - This function resets the ACPI table error counter to Zero. -**/ -VOID -ResetErrorCount ( - VOID - ); - -/** - This function returns the ACPI table error count. - - @retval Returns the count of errors detected in the ACPI tables. -**/ -UINT32 -GetErrorCount ( - VOID - ); - -/** - This function resets the ACPI table warning counter to Zero. -**/ -VOID -ResetWarningCount ( - VOID - ); - -/** - This function returns the ACPI table warning count. - - @retval Returns the count of warning detected in the ACPI tables. -**/ -UINT32 -GetWarningCount ( - VOID - ); - /** This function processes the table reporting options for the ACPI table. =20 --=20 2.24.1.windows.2