From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: suse.com, ip: 15.124.2.85, mailfrom: glin@suse.com) Received: from m4a0039g.houston.softwaregrp.com (m4a0039g.houston.softwaregrp.com [15.124.2.85]) by groups.io with SMTP; Fri, 26 Jul 2019 00:10:51 -0700 Received: FROM m4a0039g.houston.softwaregrp.com (15.120.17.147) BY m4a0039g.houston.softwaregrp.com WITH ESMTP; Fri, 26 Jul 2019 07:10:45 +0000 Received: from M4W0335.microfocus.com (2002:f78:1193::f78:1193) by M4W0335.microfocus.com (2002:f78:1193::f78:1193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 26 Jul 2019 07:06:44 +0000 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (15.124.8.10) by M4W0335.microfocus.com (15.120.17.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Fri, 26 Jul 2019 07:06:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=giR1+I9Up1eL8rIaaBK05xhmfhTP81BQBAgIHgZhKyRQEh0MQOd8ZlPtWgjo0ms+KV7iLF8bU93aMwmsGwqTtiF6IuWhRNRNttvRkGA5PdDlNaH3SdMd1A/mAgmXblZuoM/5ng/P6i7Aa1A10t21/M5jiZfoBDirMdvjUush+OXybRHMBiFYQtXZhunQ9iJL01Tg50LZ8zATaoOKsJvBH2dnW8FdXSx/6rC9S4izf9SBWWtC1s0Oa3p1hQC1aVEKvHOG4S2GCyVOpfc8PFvHn6lANy3f8ZZbsKsRKATwM9vjbGeA927vk8y5n2784fXHnfgv5QDKFGJIlVigV1Z2zg== 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=dw1WfE+6EbGahA2dLQThEcwCmql3g6sXRIvaQAkouxk=; b=TXPnrk2YTi2VMSmFhogI3yQr8Qp0IdqJL0zdJvI0F/V3Skdl39150Upiq/GIf8rV5r05Z4HfFnNta3rRzT5TVrVMDLhqXMZ4M6PQz+Dw8Cc5bCIDY/GABZU2NjLstlAbkxb4nJrHkQc4HWlm27TccD14px5J5zHvurOENxZzycX5qAlwGUG+G3a+Tl0WfgYqDgqIubP1RwATl72kJYLH2zd5mHVfmhBc7mAmrsJugKNSR4tmbG8jwCLAFM03oNoor48TLGE7DtID5pJBjSPuWAzFQOqaWZpNVlxLqVkt5NnD+bpnt3iIiKyqRtwpbSSFznp82LJtEaQm9TxJtKi4oA== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none Received: from DM6PR18MB2489.namprd18.prod.outlook.com (20.179.105.16) by DM6PR18MB2923.namprd18.prod.outlook.com (20.179.51.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.14; Fri, 26 Jul 2019 07:06:43 +0000 Received: from DM6PR18MB2489.namprd18.prod.outlook.com ([fe80::ac83:47c9:cebd:9f0]) by DM6PR18MB2489.namprd18.prod.outlook.com ([fe80::ac83:47c9:cebd:9f0%7]) with mapi id 15.20.2115.005; Fri, 26 Jul 2019 07:06:43 +0000 From: "Gary Lin" To: "devel@edk2.groups.io" CC: Zailiang Sun , Yi Qian , Michael D Kinney Subject: [PATCH edk2-platforms 4/4] Vlv2TbltDevicePkg: Clean up the unused variables and function Thread-Topic: [PATCH edk2-platforms 4/4] Vlv2TbltDevicePkg: Clean up the unused variables and function Thread-Index: AQHVQ4CuaebdMTFCe0W0pqG3h6a6Hw== Date: Fri, 26 Jul 2019 07:06:43 +0000 Message-ID: <20190726070612.3649-5-glin@suse.com> References: <20190726070612.3649-1-glin@suse.com> In-Reply-To: <20190726070612.3649-1-glin@suse.com> Accept-Language: zh-TW, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR01CA0004.apcprd01.prod.exchangelabs.com (2603:1096:203:92::16) To DM6PR18MB2489.namprd18.prod.outlook.com (2603:10b6:5:184::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=GLin@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.22.0 x-originating-ip: [202.47.205.198] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d931895c-787a-4547-2bdd-08d71197d07d x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:DM6PR18MB2923; x-ms-traffictypediagnostic: DM6PR18MB2923: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2449; x-forefront-prvs: 01106E96F6 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(199004)(189003)(52116002)(4326008)(478600001)(25786009)(316002)(50226002)(6512007)(53936002)(54906003)(68736007)(6916009)(8676002)(8936002)(1730700003)(81156014)(81166006)(2351001)(71190400001)(36756003)(66066001)(71200400001)(6116002)(66946007)(64756008)(66556008)(66476007)(66446008)(3846002)(305945005)(7736002)(256004)(86362001)(19627235002)(2906002)(80792005)(14454004)(6486002)(186003)(11346002)(476003)(102836004)(2616005)(446003)(5640700003)(1076003)(386003)(6436002)(99286004)(6506007)(2501003)(76176011)(5660300002)(26005)(486006);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR18MB2923;H:DM6PR18MB2489.namprd18.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: tGZNDdVUHhY7QUsnasXxeTsluS61DjkFdBALbBWVBBQ0RyrMVYDDXA7MqfINNkpwOvk40528vqXnfjCbYY9Tc8rYkaLFAOIUje4o25u+R3xFKsYj30nlUo+GBJ+sYOXriV1tDq0/H/z1+vRX05P8p+Qq4r6O2laQrkJNdOfLAPjuQOLaYw43k/oLWji+GtonvVTQcMiZUGHe4UPNnSkUWn0zqv+lrjh2kofMo01e40naqvNePrlrdXSqlHIJh0EgToR8TVEkJqDYDC0RPt888ROVJ9AJBVS6ZbsY65stRNfko94BZMRtyx2vclQI0/7mB1mKGuuHETt12WKSc43uvtPeyzsJGN+7HMYxppmzqPyBWbtHqa/slOQoAj3wR56Ced/04kaIWmzO0Rnr4FH7dqdDswxvLyBty2L+9npReqo= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d931895c-787a-4547-2bdd-08d71197d07d X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2019 07:06:43.3221 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GLin@suse.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB2923 Return-Path: GLin@suse.com X-OriginatorOrg: suse.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In PlatformBootOption.c: * mContinueBoot and mBootMenuBoot were assigned as "!EnterSetup" before being used. However, EnterSetup is always "FALSE", so it's meaningless to keep those variables. * mPxeBoot is defined but never used. * DetectKeypressCallback() is never used. So we can remove it altogether with mHotKeypressed and HotKeyEvent. Cc: Zailiang Sun Cc: Yi Qian Cc: Michael D Kinney Signed-off-by: Gary Lin --- Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Platfor= mBootOption.c | 57 ++++---------------- 1 file changed, 11 insertions(+), 46 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManage= rLib/PlatformBootOption.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePla= tformBootManagerLib/PlatformBootOption.c index a73d54a97d..539127e93f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Pl= atformBootOption.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Pl= atformBootOption.c @@ -10,12 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =0D #include =0D =0D -BOOLEAN mContinueBoot =3D FALSE;=0D -BOOLEAN mBootMenuBoot =3D FALSE;=0D -BOOLEAN mPxeBoot =3D FALSE;=0D -BOOLEAN mHotKeypressed =3D FALSE;=0D -EFI_EVENT HotKeyEvent =3D NULL;=0D -=0D UINTN mBootMenuOptionNumber;=0D =0D EFI_DEVICE_PATH_PROTOCOL *=0D @@ -396,21 +390,6 @@ RegisterBootOptionHotkey ( }=0D }=0D =0D -EFI_STATUS=0D -EFIAPI=0D -DetectKeypressCallback (=0D - IN EFI_KEY_DATA *KeyData=0D -)=0D -{=0D - mHotKeypressed =3D TRUE;=0D -=0D - if (HotKeyEvent !=3D NULL) {=0D - gBS->SignalEvent(HotKeyEvent);=0D - }=0D -=0D - return EFI_SUCCESS;=0D -}=0D -=0D /**=0D This function is called after all the boot options are enumerated and or= dered properly.=0D **/=0D @@ -419,46 +398,32 @@ RegisterStaticHotkey ( VOID=0D )=0D {=0D -=0D EFI_INPUT_KEY Enter;=0D - EFI_KEY_DATA F2;=0D - EFI_KEY_DATA F7;=0D - BOOLEAN EnterSetup;=0D + EFI_INPUT_KEY F2;=0D + EFI_INPUT_KEY F7;=0D EFI_STATUS Status;=0D EFI_BOOT_MANAGER_LOAD_OPTION BootOption;=0D =0D - EnterSetup =3D FALSE;=0D -=0D //=0D // [Enter]=0D //=0D - mContinueBoot =3D !EnterSetup;=0D - if (mContinueBoot) {=0D - Enter.ScanCode =3D SCAN_NULL;=0D - Enter.UnicodeChar =3D CHAR_CARRIAGE_RETURN;=0D - EfiBootManagerRegisterContinueKeyOption (0, &Enter, NULL);=0D - }=0D -=0D + Enter.ScanCode =3D SCAN_NULL;=0D + Enter.UnicodeChar =3D CHAR_CARRIAGE_RETURN;=0D + EfiBootManagerRegisterContinueKeyOption (0, &Enter, NULL);=0D =0D //=0D // [F2]/[F7]=0D //=0D - F2.Key.ScanCode =3D SCAN_F2;=0D - F2.Key.UnicodeChar =3D CHAR_NULL;=0D - F2.KeyState.KeyShiftState =3D EFI_SHIFT_STATE_VALID;=0D - F2.KeyState.KeyToggleState =3D 0;=0D + F2.ScanCode =3D SCAN_F2;=0D + F2.UnicodeChar =3D CHAR_NULL;=0D Status =3D EfiBootManagerGetBootManagerMenu (&BootOption);=0D ASSERT_EFI_ERROR (Status);=0D - RegisterBootOptionHotkey ((UINT16) BootOption.OptionNumber, &F2.Key, TRU= E);=0D + RegisterBootOptionHotkey ((UINT16) BootOption.OptionNumber, &F2, TRUE);= =0D EfiBootManagerFreeLoadOption (&BootOption);=0D =0D - F7.Key.ScanCode =3D SCAN_F7;=0D - F7.Key.UnicodeChar =3D CHAR_NULL;=0D - F7.KeyState.KeyShiftState =3D EFI_SHIFT_STATE_VALID;=0D - F7.KeyState.KeyToggleState =3D 0;=0D - mBootMenuBoot =3D !EnterSetup;=0D - RegisterBootOptionHotkey ((UINT16) mBootMenuOptionNumber, &F7.Key, mBoot= MenuBoot);=0D -=0D + F7.ScanCode =3D SCAN_F7;=0D + F7.UnicodeChar =3D CHAR_NULL;=0D + RegisterBootOptionHotkey ((UINT16) mBootMenuOptionNumber, &F7, TRUE);=0D }=0D =0D UINT8=0D --=20 2.22.0