From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 19B47210E2DDA for ; Wed, 8 Aug 2018 20:15:10 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Aug 2018 20:15:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,213,1531810800"; d="scan'208";a="252546877" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 08 Aug 2018 20:15:03 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 8 Aug 2018 20:15:02 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.143]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.205]) with mapi id 14.03.0319.002; Thu, 9 Aug 2018 11:15:01 +0800 From: "Ni, Ruiyu" To: "Zhang, Shenglei" , "edk2-devel@lists.01.org" CC: "Dong, Eric" , "Zeng, Star" Thread-Topic: [edk2] [PATCH 04/26] MdeModulePkg EhciDxe: Remove redundant functions Thread-Index: AQHULvSD5FxgLAiTXU6tEG40zDNi6aS2wFYg Date: Thu, 9 Aug 2018 03:14:52 +0000 Deferred-Delivery: Thu, 9 Aug 2018 03:15:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BDC96A3@SHSMSX104.ccr.corp.intel.com> References: <20180808084712.34696-1-shenglei.zhang@intel.com> <20180808084712.34696-5-shenglei.zhang@intel.com> In-Reply-To: <20180808084712.34696-5-shenglei.zhang@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 04/26] MdeModulePkg EhciDxe: Remove redundant functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 03:15:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: edk2-devel On Behalf Of shenglei > Sent: Wednesday, August 8, 2018 4:47 PM > To: edk2-devel@lists.01.org > Cc: Dong, Eric ; Zeng, Star > Subject: [edk2] [PATCH 04/26] MdeModulePkg EhciDxe: Remove redundant > functions >=20 > The functions that are never called have been removed. > They are EhcDumpRegs,EhcDisableAsyncSchd and EhcDisablePeriodSchd > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1062 >=20 > Cc: Star Zeng > Cc: Eric Dong > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: shenglei > --- > MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c | 27 --------------- > MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h | 11 ------ > MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c | 44 ------------------------ > 3 files changed, 82 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c > b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c > index 76368b4748..71755d421b 100644 > --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c > +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c > @@ -228,31 +228,4 @@ EhcDumpBuf ( > DEBUG ((EFI_D_VERBOSE, "\n")); > } >=20 > -/** > - Dump the EHCI status registers. > - > - @param Ehc USB EHCI Host Controller instance >=20 > -**/ > -VOID > -EhcDumpRegs ( > - IN USB2_HC_DEV *Ehc > - ) > -{ > - UINT8 Index; > - > - DEBUG ((EFI_D_VERBOSE, " EHC_CAPLENGTH_OFFSET =3D 0x%08x\n", > EhcReadCapRegister (Ehc, EHC_CAPLENGTH_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_HCSPARAMS_OFFSET =3D 0x%08x\n", > EhcReadCapRegister (Ehc, EHC_HCSPARAMS_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_HCCPARAMS_OFFSET =3D 0x%08x\n", > EhcReadCapRegister (Ehc, EHC_HCCPARAMS_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_USBCMD_OFFSET =3D 0x%08x\n", > EhcReadOpReg (Ehc, EHC_USBCMD_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_USBSTS_OFFSET =3D 0x%08x\n", > EhcReadOpReg (Ehc, EHC_USBSTS_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_USBINTR_OFFSET =3D 0x%08x\n", > EhcReadOpReg (Ehc, EHC_USBINTR_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_FRINDEX_OFFSET =3D 0x%08x\n", > EhcReadOpReg (Ehc, EHC_FRINDEX_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_CTRLDSSEG_OFFSET =3D 0x%08x\n", > EhcReadOpReg (Ehc, EHC_CTRLDSSEG_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_FRAME_BASE_OFFSET =3D 0x%08x\n", > EhcReadOpReg (Ehc, EHC_FRAME_BASE_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_ASYNC_HEAD_OFFSET =3D 0x%08x\n", > EhcReadOpReg (Ehc, EHC_ASYNC_HEAD_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_CONFIG_FLAG_OFFSET =3D 0x%08x\n", > EhcReadOpReg (Ehc, EHC_CONFIG_FLAG_OFFSET))); > - for (Index =3D 0; Index < (UINT8) (Ehc->HcStructParams & HCSP_NPORTS); > Index++) { > - DEBUG ((EFI_D_VERBOSE, " EHC_PORT_STAT_OFFSET(%d) =3D 0x%08x\n", > Index, EhcReadOpReg (Ehc, EHC_PORT_STAT_OFFSET + (4 * Index)))); > - } > -} > diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h > b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h > index bc84bb7864..a64b0551a0 100644 > --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h > +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h > @@ -61,15 +61,4 @@ EhcDumpBuf ( > ); >=20 >=20 > -/** > - Dump the EHCI status registers. > - > - @param Ehc USB EHCI Host Controller instance > - > -**/ > -VOID > -EhcDumpRegs ( > - IN USB2_HC_DEV *Ehc > - ); > - > #endif > diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c > b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c > index 34836eccf5..59752d1bdc 100644 > --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c > +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c > @@ -372,29 +372,7 @@ EhcEnablePeriodSchd ( } >=20 >=20 > -/** > - Disable periodic schedule. >=20 > - @param Ehc The EHCI device. > - @param Timeout Time to wait before abort (in millisecond, m= s). > - > - @retval EFI_SUCCESS Periodic schedule is disabled. > - @retval EFI_DEVICE_ERROR Fail to disable periodic schedule. > - > -**/ > -EFI_STATUS > -EhcDisablePeriodSchd ( > - IN USB2_HC_DEV *Ehc, > - IN UINT32 Timeout > - ) > -{ > - EFI_STATUS Status; > - > - EhcClearOpRegBit (Ehc, EHC_USBCMD_OFFSET, > USBCMD_ENABLE_PERIOD); > - > - Status =3D EhcWaitOpRegBit (Ehc, EHC_USBSTS_OFFSET, > USBSTS_PERIOD_ENABLED, FALSE, Timeout); > - return Status; > -} >=20 >=20 >=20 > @@ -424,29 +402,7 @@ EhcEnableAsyncSchd ( >=20 >=20 >=20 > -/** > - Disable asynchrounous schedule. >=20 > - @param Ehc The EHCI device. > - @param Timeout Time to wait before abort (in millisecond, ms). > - > - @retval EFI_SUCCESS The asynchronous schedule is disabled. > - @return Others Failed to disable the asynchronous schedule. > - > -**/ > -EFI_STATUS > -EhcDisableAsyncSchd ( > - IN USB2_HC_DEV *Ehc, > - IN UINT32 Timeout > - ) > -{ > - EFI_STATUS Status; > - > - EhcClearOpRegBit (Ehc, EHC_USBCMD_OFFSET, USBCMD_ENABLE_ASYNC); > - > - Status =3D EhcWaitOpRegBit (Ehc, EHC_USBSTS_OFFSET, > USBSTS_ASYNC_ENABLED, FALSE, Timeout); > - return Status; > -} >=20 >=20 >=20 > -- > 2.18.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel