From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (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 2FF1E21CAD998 for ; Wed, 8 Aug 2018 11:08:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C1C487A77; Wed, 8 Aug 2018 18:08:35 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-208.rdu2.redhat.com [10.10.120.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9EC7F10F1BE2; Wed, 8 Aug 2018 18:08:34 +0000 (UTC) To: shenglei , edk2-devel@lists.01.org Cc: Eric Dong , Star Zeng References: <20180808084712.34696-1-shenglei.zhang@intel.com> <20180808084712.34696-5-shenglei.zhang@intel.com> From: Laszlo Ersek Message-ID: <1c5f4748-80d9-e352-fc0a-06312961a187@redhat.com> Date: Wed, 8 Aug 2018 20:08:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180808084712.34696-5-shenglei.zhang@intel.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 08 Aug 2018 18:08:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 08 Aug 2018 18:08:35 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' 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: Wed, 08 Aug 2018 18:08:36 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/08/18 10:46, shenglei wrote: > The functions that are never called have been removed. > They are EhcDumpRegs,EhcDisableAsyncSchd and EhcDisablePeriodSchd > https://bugzilla.tianocore.org/show_bug.cgi?id=1062 > > 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(-) Reviewed-by: Laszlo Ersek Laszlo > > 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")); > } > > -/** > - Dump the EHCI status registers. > - > - @param Ehc USB EHCI Host Controller instance > > -**/ > -VOID > -EhcDumpRegs ( > - IN USB2_HC_DEV *Ehc > - ) > -{ > - UINT8 Index; > - > - DEBUG ((EFI_D_VERBOSE, " EHC_CAPLENGTH_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_CAPLENGTH_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_HCSPARAMS_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_HCSPARAMS_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_HCCPARAMS_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_HCCPARAMS_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_USBCMD_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBCMD_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_USBSTS_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBSTS_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_USBINTR_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBINTR_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_FRINDEX_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_FRINDEX_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_CTRLDSSEG_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_CTRLDSSEG_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_FRAME_BASE_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_FRAME_BASE_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_ASYNC_HEAD_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_ASYNC_HEAD_OFFSET))); > - DEBUG ((EFI_D_VERBOSE, " EHC_CONFIG_FLAG_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_CONFIG_FLAG_OFFSET))); > - for (Index = 0; Index < (UINT8) (Ehc->HcStructParams & HCSP_NPORTS); Index++) { > - DEBUG ((EFI_D_VERBOSE, " EHC_PORT_STAT_OFFSET(%d) = 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 ( > ); > > > -/** > - 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 ( > } > > > -/** > - Disable periodic schedule. > > - @param Ehc The EHCI device. > - @param Timeout Time to wait before abort (in millisecond, ms). > - > - @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 = EhcWaitOpRegBit (Ehc, EHC_USBSTS_OFFSET, USBSTS_PERIOD_ENABLED, FALSE, Timeout); > - return Status; > -} > > > > @@ -424,29 +402,7 @@ EhcEnableAsyncSchd ( > > > > -/** > - Disable asynchrounous schedule. > > - @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 = EhcWaitOpRegBit (Ehc, EHC_USBSTS_OFFSET, USBSTS_ASYNC_ENABLED, FALSE, Timeout); > - return Status; > -} > > > >