From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.84]) by mx.groups.io with SMTP id smtpd.web12.6627.1594549961909766441 for ; Sun, 12 Jul 2020 03:32:43 -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=j7jUH8I6; spf=pass (domain: arm.com, ip: 40.107.7.84, 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=A7PliNOrj9qgZNh+9jyMkscQaSHchAilra5ny3f7Cjw=; b=j7jUH8I6gWYhvnKsBmN7qLT8tahlqsUNa4SBU8Tch9rhIb0wuYOxuO5oRt0b9Sv/x1GJnD7jHIQaZZefEpO3iPQD9XhDfeRwUeegZv6LnwN6+efnGf9WF3eS+HQTQOnazA8etJMYOKRwK+EMy4CtVzkZpwJQ60EIVlJBJZ42t7o= Received: from AM6P192CA0065.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::42) by VI1PR0801MB1696.eurprd08.prod.outlook.com (2603:10a6:800:51::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Sun, 12 Jul 2020 10:32:39 +0000 Received: from VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:82:cafe::8c) by AM6P192CA0065.outlook.office365.com (2603:10a6:209:82::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Sun, 12 Jul 2020 10:32:38 +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 VE1EUR03FT049.mail.protection.outlook.com (10.152.19.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Sun, 12 Jul 2020 10:32:38 +0000 Received: ("Tessian outbound 1c27ecaec3d6:v62"); Sun, 12 Jul 2020 10:32:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f4ccd03dcdca4435 X-CR-MTA-TID: 64aa7808 Received: from f8230f27f8be.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B254D1C4-269B-4B20-8E98-9F1F910E1465.1; Sun, 12 Jul 2020 10:32:33 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f8230f27f8be.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 12 Jul 2020 10:32:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H0s+IzbxvgER21zBCtDcbSzlWzTVNmdYS4ORDKyLU3rOW5zTXMrbLKdBGgeOzIklUnumV57CnO+6pu6gPxoz+G3Xbv3n5ORbOEJNDNeUtCHEA0s+1NiobV5NI5Kls0g+rytJGFZWOWlcX+PGrD8d5N1cnZSaI95JUzcwYDgmCFNyFl6Z2cJXzckA52SFutmaVU4/e5V4aQpUmJilZKYpjgDfg2SUcwcTb5IVf1c7g0RCfSTIVQQOaQ29HIKNelocT3dBWDmrcvZwlgkyJu71PXFAy5EHYD76ugbPXkRQVvadtFjijmyGN7GKVunxdPCgr+KFeDa8ivhjHYPEpnMkgg== 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=A7PliNOrj9qgZNh+9jyMkscQaSHchAilra5ny3f7Cjw=; b=ag8PW6Eu+oTrAixzq9IS5mBFuRSNxPwfx/sOSKAzAF48kBYas6TxMtmEeNpoCVSYfrflbFa7zCipCExKzZGv6vj3rdtsb8YdPWKQtMzVCyn7k81500S8qMXJ1/2ZAFG0mJ2Qy5LW6CZ7i39zylLYSWNOrGvH8+8ZGw2M50AOMohIrS/qOVAsgkE7Vc6l7jW7Gh05sCtoiw/BAZEcCSp4eSI/yDiWaueE+IWRqgWqzWHJNxRty2ZwM9gNVTWem+pTpaTgabeT/HrcajE26PK3UPMUvJMyum8W56R6QD8SlnaETVDk+ZrGANyjDkLAfJ4gwd8s1OykCjaWn7sweUcBkQ== 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=A7PliNOrj9qgZNh+9jyMkscQaSHchAilra5ny3f7Cjw=; b=j7jUH8I6gWYhvnKsBmN7qLT8tahlqsUNa4SBU8Tch9rhIb0wuYOxuO5oRt0b9Sv/x1GJnD7jHIQaZZefEpO3iPQD9XhDfeRwUeegZv6LnwN6+efnGf9WF3eS+HQTQOnazA8etJMYOKRwK+EMy4CtVzkZpwJQ60EIVlJBJZ42t7o= Received: from DBBPR09CA0015.eurprd09.prod.outlook.com (2603:10a6:10:c0::27) by DB8PR08MB5340.eurprd08.prod.outlook.com (2603:10a6:10:11c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.22; Sun, 12 Jul 2020 10:32:30 +0000 Received: from DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::ee) by DBBPR09CA0015.outlook.office365.com (2603:10a6:10:c0::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Sun, 12 Jul 2020 10:32:29 +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 DB5EUR03FT008.mail.protection.outlook.com (10.152.20.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3174.21 via Frontend Transport; Sun, 12 Jul 2020 10:32:29 +0000 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; Sun, 12 Jul 2020 10:32:29 +0000 Received: from localhost.localdomain (10.57.55.192) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Sun, 12 Jul 2020 10:32:28 +0000 From: "Tomas Pilar (tpilar)" To: CC: , , Ray Ni , "Zhichao Gao" Subject: [PATCH v2 2/8] ShellPkg/AcpiView: Declutter error counters Date: Sun, 12 Jul 2020 11:32:09 +0100 Message-ID: <20200712103215.855-3-Tomas.Pilar@arm.com> X-Mailer: git-send-email 2.24.1.windows.2 In-Reply-To: <20200712103215.855-1-Tomas.Pilar@arm.com> References: <20200712103215.855-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)(396003)(346002)(136003)(39850400004)(376002)(46966005)(4326008)(426003)(2906002)(81166007)(70206006)(356005)(186003)(70586007)(82310400002)(82740400003)(54906003)(26005)(47076004)(1076003)(36756003)(336012)(478600001)(86362001)(8936002)(83380400001)(5660300002)(6666004)(6916009)(8676002)(316002)(2616005);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc3080f9-2886-4d5f-77ea-08d8264ee655 X-MS-TrafficTypeDiagnostic: DB8PR08MB5340:|VI1PR0801MB1696: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:107;OLM:107; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: TH14gQm0V/j6apZAs99x+WqJ29+roZvlywoIEF7kM5aYSLVUbsUNm/6Hb/1z9qKDNExoNqIX3D4KJDgN5mwYWfnTioKRape6ubP6KnfhHN2MuxkmkOputnUpAQOfR0GBXlIVdzmf79qkgrcHJ/q5ZuhfJ741eJ/rkQoZ2KM8pyF63x8bKgLw5pLSpxATzpVEtpbFUiJLkjpG0E8B0f1Y7ulfirlsliYuGLiDyIn9gp3ya7e3u5Vb1CRaXI2zH3FWAnauZ/0Dg70nskOSTllOarOM9xy8OycmHTKmU3iOka6UvgPby96UWWxGAKxwz2WiyfGd9jLF7uIR3lrw9RIs1BDV41KtoUwYmbCg39+vpCKeVoK3kphQ+gZ7hzzeZ2ltCbo++JQ95wL00b2uyirhYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5340 Return-Path: Tomas.Pilar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT049.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)(396003)(39850400004)(376002)(136003)(346002)(46966005)(36756003)(81166007)(82740400003)(82310400002)(36906005)(86362001)(6916009)(70586007)(70206006)(4326008)(8676002)(478600001)(107886003)(5660300002)(2616005)(316002)(54906003)(47076004)(8936002)(83380400001)(2906002)(6666004)(1076003)(426003)(336012)(26005)(186003);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 07fc4d4c-d771-48ed-2b95-08d8264ee11a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1ZfxSSDu5Jplrn/cb3Gyp0ZkXBMGv9YGOA1BoslNfv/YyvEKVOo5fycIP/oCGTPxMenxYiEx4UA4kOzqlbGhC4oGp7xm8QyOq5IhMCwj6EKQaRTnbsHOi4qDubckLKtrxXNqyoM7kZM/Z0dXAaHq9DQuB/jGL2h4os8OZU+VtmhIGSCthXcExLtlwYS9uODmKlEDidjUBGqgpq8fcQfjU8PnzUMdMpeH//iy8svOuyB9Rb9fn3/mVjb7Vffx+N/u8L6AhQDHTWWOsouSyYWVMW5lxO+sV5zSgLBg1MaNf2sdYnMYHNaB8RRL5vczsWPb+sFwBpQ4uJixjMZArL1gDAHgws6H/IMc0JZ6gYnL38chyXnXhA/lpLv4XJTl2++p90Wfb7rJXAGG1nP8YySnYg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2020 10:32:38.5111 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc3080f9-2886-4d5f-77ea-08d8264ee655 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: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1696 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Remove superfluous accessor methods for error and warning counters. Change-Id: I23df0aa10cfc757f37d83dee7ecce8a188a3ad1c 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 d0a0edc45f3b..16f498b8c328 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -197,8 +197,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; @@ -276,7 +276,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) @@ -284,10 +284,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) @@ -296,7 +296,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