Reviewed-by: Ruiyu Ni <ruiyu...@intel.com> Thanks/Ray
> -----Original Message----- > From: edk2-devel <edk2-devel-boun...@lists.01.org> On Behalf Of shenglei > Sent: Wednesday, August 8, 2018 4:47 PM > To: edk2-devel@lists.01.org > Cc: Dong, Eric <eric.d...@intel.com>; Zeng, Star <star.z...@intel.com> > Subject: [edk2] [PATCH 09/26] MdeModulePkg XhciDxe: Remove redundant > functions > > The functions that are never called have been removed. > They are XhcReadDoorBellReg and XhcWriteOpReg16. > https://bugzilla.tianocore.org/show_bug.cgi?id=1062 > > Cc: Star Zeng <star.z...@intel.com> > Cc: Eric Dong <eric.d...@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: shenglei <shenglei.zh...@intel.com> > --- > MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c | 66 -------------------------- > MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h | 28 ----------- > 2 files changed, 94 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c > index 4d5937de53..5f0736a516 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c > @@ -158,75 +158,9 @@ XhcWriteOpReg ( > } > } > > -/** > - Write the data to the 2-bytes width XHCI operational register. > > - @param Xhc The XHCI Instance. > - @param Offset The offset of the 2-bytes width operational register. > - @param Data The data to write. > > -**/ > -VOID > -XhcWriteOpReg16 ( > - IN USB_XHCI_INSTANCE *Xhc, > - IN UINT32 Offset, > - IN UINT16 Data > - ) > -{ > - EFI_STATUS Status; > - > - ASSERT (Xhc->CapLength != 0); > - > - Status = Xhc->PciIo->Mem.Write ( > - Xhc->PciIo, > - EfiPciIoWidthUint16, > - XHC_BAR_INDEX, > - Xhc->CapLength + Offset, > - 1, > - &Data > - ); > - > - if (EFI_ERROR (Status)) { > - DEBUG ((EFI_D_ERROR, "XhcWriteOpReg16: Pci Io Write error: %r > at %d\n", Status, Offset)); > - } > -} > - > -/** > - Read XHCI door bell register. > - > - @param Xhc The XHCI Instance. > - @param Offset The offset of the door bell register. > > - @return The register content read > - > -**/ > -UINT32 > -XhcReadDoorBellReg ( > - IN USB_XHCI_INSTANCE *Xhc, > - IN UINT32 Offset > - ) > -{ > - UINT32 Data; > - EFI_STATUS Status; > - > - ASSERT (Xhc->DBOff != 0); > - > - Status = Xhc->PciIo->Mem.Read ( > - Xhc->PciIo, > - EfiPciIoWidthUint32, > - XHC_BAR_INDEX, > - Xhc->DBOff + Offset, > - 1, > - &Data > - ); > - > - if (EFI_ERROR (Status)) { > - DEBUG ((EFI_D_ERROR, "XhcReadDoorBellReg: Pci Io Read error - %r > at %d\n", Status, Offset)); > - Data = 0xFFFFFFFF; > - } > - > - return Data; > -} > > /** > Write the data to the XHCI door bell register. > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h > index 838a44628c..20e7ac0e8f 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h > @@ -286,20 +286,6 @@ XhcWriteOpReg ( > IN UINT32 Data > ); > > -/** > - Write the data to the 2-bytes width XHCI operational register. > - > - @param Xhc The XHCI Instance. > - @param Offset The offset of the 2-bytes width operational register. > - @param Data The data to write. > - > -**/ > -VOID > -XhcWriteOpReg16 ( > - IN USB_XHCI_INSTANCE *Xhc, > - IN UINT32 Offset, > - IN UINT16 Data > - ); > > /** > Read XHCI runtime register. > @@ -331,20 +317,6 @@ XhcWriteRuntimeReg ( > IN UINT32 Data > ); > > -/** > - Read XHCI door bell register. > - > - @param Xhc The XHCI Instance. > - @param Offset The offset of the door bell register. > - > - @return The register content read > - > -**/ > -UINT32 > -XhcReadDoorBellReg ( > - IN USB_XHCI_INSTANCE *Xhc, > - IN UINT32 Offset > - ); > > /** > Write the data to the XHCI door bell register. > -- > 2.18.0.windows.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel