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.83]) by mx.groups.io with SMTP id smtpd.web12.1963.1594748775502028361 for ; Tue, 14 Jul 2020 10:46:16 -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=LAeQbgpH; spf=pass (domain: arm.com, ip: 40.107.7.83, 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=qIZmKM6GOAZyrImbFIiTeCsTjFCvJ/uxqSRIwF/iaEU=; b=LAeQbgpHsKik7WXlYoZd9st7/GM3qkjyeyXV22n+XIQ98Hkg83LSBXeTGnsSgv5iWYMefRZurnHIxu1wDHI/Fx4LqmALUwFBj6XpSfHuDsBH16YJjvbt4tvgEes70XANLyRF9+u6xgz0sWVbBmgJolRyLIgcTz2PXJv/vaFAZ80= Received: from AM5PR1001CA0040.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:15::17) by VI1PR08MB2974.eurprd08.prod.outlook.com (2603:10a6:803:3f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.22; Tue, 14 Jul 2020 17:46:12 +0000 Received: from VE1EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:15:cafe::63) by AM5PR1001CA0040.outlook.office365.com (2603:10a6:206:15::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17 via Frontend Transport; Tue, 14 Jul 2020 17:46:12 +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 VE1EUR03FT017.mail.protection.outlook.com (10.152.18.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Tue, 14 Jul 2020 17:46:11 +0000 Received: ("Tessian outbound c4059ed8d7bf:v62"); Tue, 14 Jul 2020 17:46:11 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8a2cc5bab3b0e708 X-CR-MTA-TID: 64aa7808 Received: from 582f46816b3f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3D3B60DD-858D-4EA9-9519-A76F71C4CE88.1; Tue, 14 Jul 2020 17:46:06 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 582f46816b3f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 14 Jul 2020 17:46:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L+87n92VCswypKOOcepd7vOu0WOI4LPA0s9KmXlnubtLnNm7TaVK8ewAE4j6u2+5srEWPxtXQok290/ZMNULKxradp5zeAT4H5VVja6xcZjhmHH5Iq4pwcagwZo3yoWcBKwB6xOjt+hc7EJCYuiqEOqgNBAh36Kx8TN0NzQPxWOd7H3QUqn7g58IMUg26A7NHNMwxh27BVSVwRpJ8hoEZITEtcPBvFaF1MePodAbzKE7wSPTSTWgN5oaNNsn40i5MCvjeO1ZVmH6m+EgxnWo8+Cc+kTk9i69nSxST2YbAyjVqXyUiw9PH7mvs9mssXBhWOwp/pAtEtahAfYbwCxV9g== 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=qIZmKM6GOAZyrImbFIiTeCsTjFCvJ/uxqSRIwF/iaEU=; b=BMw94LhRr2uM4GtXCWuS7ntRYAgOPl9orNuSQ8i53jowvOzIzgxdp4RLwT6Nb+IPLr8y1dVQtwRQrL2R76E9OfL4kVb1+KpZOI7RFX6bk2TUG0pLG7InHiPG2s97NA5+8mhH0p2N2VRno62cXFe/HauU1wKVlgvFdp8C55uMvp+aWv/sn0PNufW4u3faKD5T5rldL7cadesp30wVFpaudZskyAVQEmWZj6lwBSkBmbpURHornyAf2vmJrHQmxS8CvTAtc8+CWpNE6Qjw1UdUcebguTC4q85Dv/48aF8OU0+Sgn+zMMITKVHksTWr6i0fC3Cmm8S4xSdk/sx24ZLjyg== 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=qIZmKM6GOAZyrImbFIiTeCsTjFCvJ/uxqSRIwF/iaEU=; b=LAeQbgpHsKik7WXlYoZd9st7/GM3qkjyeyXV22n+XIQ98Hkg83LSBXeTGnsSgv5iWYMefRZurnHIxu1wDHI/Fx4LqmALUwFBj6XpSfHuDsBH16YJjvbt4tvgEes70XANLyRF9+u6xgz0sWVbBmgJolRyLIgcTz2PXJv/vaFAZ80= Received: from MRXP264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:15::33) by AM6PR08MB3717.eurprd08.prod.outlook.com (2603:10a6:20b:8e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Tue, 14 Jul 2020 17:46:04 +0000 Received: from VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:15:cafe::ae) by MRXP264CA0021.outlook.office365.com (2603:10a6:500:15::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Tue, 14 Jul 2020 17:46:04 +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 VE1EUR03FT009.mail.protection.outlook.com (10.152.18.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3174.21 via Frontend Transport; Tue, 14 Jul 2020 17:46:04 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Tue, 14 Jul 2020 17:46:00 +0000 Received: from localhost.localdomain (10.57.32.194) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 14 Jul 2020 17:46:00 +0000 From: "Tomas Pilar (tpilar)" To: CC: , , Ray Ni , "Zhichao Gao" Subject: [PATCH v3 2/8] ShellPkg/AcpiView: Declutter error counters Date: Tue, 14 Jul 2020 18:45:40 +0100 Message-ID: <20200714174546.560-3-Tomas.Pilar@arm.com> X-Mailer: git-send-email 2.24.1.windows.2 In-Reply-To: <20200714174546.560-1-Tomas.Pilar@arm.com> References: <20200714174546.560-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)(46966005)(498600001)(1076003)(6666004)(6916009)(8676002)(2906002)(36756003)(8936002)(86362001)(54906003)(26005)(186003)(70586007)(70206006)(82310400002)(2616005)(4326008)(356005)(81166007)(83380400001)(426003)(336012)(5660300002)(47076004);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3096ce1-7b24-4e24-17d4-08d8281dcc56 X-MS-TrafficTypeDiagnostic: AM6PR08MB3717:|VI1PR08MB2974: 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: +KixgBGFskKw+BDFFDgUp2wyn27u068iti48Zf5oH/NuEXZ4oJtywC8CdU1JVHvbtTYDoK9eyUAzvUWiysw5tEjVp4KIeVyOIi5jkZ82Ut1KcQ6Jjs3snt0mTxGlUNEdcm628X2H21qwsmNF1pd+BGlAWIXH2WLay9qGZ+b2YIYSdFiIj0emuMLmkU7R87PinGb4YS3x4Fis/Os240+f/JyHPvXUuJN/0/myKHisQg2LhKA04BTtEqNWWaET1ablsQ+Nj8zcpe+RbLI/Qom/HyTgeN48R/Bii36iba6MTIg8y5v75q4Ii+mFjOIFJzDHYXUmZqMLA6a4APexJQSTSFi4TVtmcd3DN8/O4/LU/LMbQc4AstEOcqJ+zy6GzF09wU3rw6EholAH0bWXCVBzZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3717 Return-Path: Tomas.Pilar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT017.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)(346002)(39860400002)(396003)(376002)(136003)(46966005)(70586007)(70206006)(26005)(2906002)(107886003)(426003)(6916009)(2616005)(36756003)(186003)(36906005)(336012)(6666004)(82740400003)(8936002)(316002)(47076004)(5660300002)(4326008)(83380400001)(81166007)(86362001)(54906003)(1076003)(8676002)(82310400002)(478600001);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 728d6a81-4f28-4d9f-8ead-08d8281dc7eb X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6WBDWiw6tQARbsMEIdsihssi9YqYJUp5qgaaMcST1oB8uCwRxUGsE0GN2nvNqxcUoz6vjgi/uSShWicJAlPQI8IYhIEBK0dH7ozKO38S59YElEIjAo/zD+UNzK837h4mIi1yDrWSRCK51J6wW9g7DwdUsipDM7ZbiNXbmSlUmaSLptEbPXi4QNgwS6Bw6udwUQnWOK7YBQuU3wlYkvAGBuYIfuAw1Hu4zhFDSS4XJw35zHJ12HzMwdEEajcDnHfPLXZmt1KZtZgHZmaUwXjuxzsF17sm0arrsJ9o47pMliCOhbW7w0lBhh2Y7XKgSPSz+7wqEsYXbOs6NVjDq23/K0EvEzk8qUsMRB6EO2Q/bwtpheBJiFk8I2rAhXCMKq/XN/mfG35LMOEK90LZZFBJPg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2020 17:46:11.9132 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3096ce1-7b24-4e24-17d4-08d8281dcc56 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: VE1EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2974 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 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