Reviewed-by: Ruiyu Ni <[email protected]>

Thanks/Ray

> -----Original Message-----
> From: edk2-devel <[email protected]> On Behalf Of shenglei
> Sent: Wednesday, August 8, 2018 4:47 PM
> To: [email protected]
> Cc: Dong, Eric <[email protected]>; Zeng, Star <[email protected]>
> Subject: [edk2] [PATCH 10/26] MdeModulePkg XhciPei: Remove redundant
> functions
> 
> The functions that are never called have been removed.
> They are XhcPeiReadDoorBellReg and UsbHcUnlinkMemBlock.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1062
> 
> Cc: Star Zeng <[email protected]>
> Cc: Eric Dong <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: shenglei <[email protected]>
> ---
>  MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c | 24 ------------------------
> MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c  | 22 ----------------------
> MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h  | 14 --------------
>  3 files changed, 60 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> b/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> index 5d0232ca56..442a613095 100644
> --- a/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> +++ b/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> @@ -328,31 +328,7 @@ UsbHcIsMemBlockEmpty (
>    return TRUE;
>  }
> 
> -/**
> -  Unlink the memory block from the pool's list.
> -
> -  @param  Head          The block list head of the memory's pool.
> -  @param  BlockToUnlink The memory block to unlink.
> 
> -**/
> -VOID
> -UsbHcUnlinkMemBlock (
> -  IN USBHC_MEM_BLOCK    *Head,
> -  IN USBHC_MEM_BLOCK    *BlockToUnlink
> -  )
> -{
> -  USBHC_MEM_BLOCK       *Block;
> -
> -  ASSERT ((Head != NULL) && (BlockToUnlink != NULL));
> -
> -  for (Block = Head; Block != NULL; Block = Block->Next) {
> -    if (Block->Next == BlockToUnlink) {
> -      Block->Next         = BlockToUnlink->Next;
> -      BlockToUnlink->Next = NULL;
> -      break;
> -    }
> -  }
> -}
> 
>  /**
>    Initialize the memory management pool for the host controller.
> diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c
> b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c
> index c5631e87ca..ee4d1f97bd 100644
> --- a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c
> +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c
> @@ -211,29 +211,7 @@ XhcPeiReadCapRegister (
>    return Data;
>  }
> 
> -/**
> -  Read XHCI door bell register.
> -
> -  @param  Xhc       The XHCI device.
> -  @param  Offset    The offset of the door bell register.
> -
> -  @return The register content read
> 
> -**/
> -UINT32
> -XhcPeiReadDoorBellReg (
> -  IN  PEI_XHC_DEV       *Xhc,
> -  IN  UINT32            Offset
> -  )
> -{
> -  UINT32                  Data;
> -
> -  ASSERT (Xhc->DBOff != 0);
> -
> -  Data = MmioRead32 (Xhc->UsbHostControllerBaseAddress + Xhc->DBOff +
> Offset);
> -
> -  return Data;
> -}
> 
>  /**
>    Write the data to the XHCI door bell register.
> diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h
> b/MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h
> index 0297072ffd..3787aeccf5 100644
> --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h
> +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h
> @@ -302,20 +302,6 @@ XhcPeiWaitOpRegBit (
>    IN UINT32             Timeout
>    );
> 
> -/**
> -  Read XHCI door bell register.
> -
> -  @param  Xhc           The XHCI device.
> -  @param  Offset        The offset of the door bell register.
> -
> -  @return The register content read
> -
> -**/
> -UINT32
> -XhcPeiReadDoorBellReg (
> -  IN  PEI_XHC_DEV       *Xhc,
> -  IN  UINT32            Offset
> -  );
> 
>  /**
>    Write the data to the XHCI door bell register.
> --
> 2.18.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to