]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg PciBusDxe: Remove redundant functions
authorshenglei <shenglei.zhang@intel.com>
Wed, 8 Aug 2018 05:47:20 +0000 (13:47 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 21 Aug 2018 08:28:57 +0000 (16:28 +0800)
The functions that are never called have been removed.
They are UpStreamBridgesAttributes and GetHpcPciAddressFromRootBridge.
https://bugzilla.tianocore.org/show_bug.cgi?id=1062

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei <shenglei.zhang@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.h

index 48cf57a24f8f4cb2347c0cd05b6ac83483729658..f7039da99210b0252b7b15928b805d3db9e812a3 100644 (file)
@@ -1061,85 +1061,5 @@ ActiveVGADeviceOnTheRootBridge (
 }\r
 \r
 \r
-/**\r
-  Get HPC PCI address according to its device path.\r
-\r
-  @param RootBridge           Root bridege Io instance.\r
-  @param RemainingDevicePath  Given searching device path.\r
-  @param PciAddress           Buffer holding searched result.\r
-\r
-  @retval EFI_SUCCESS         PCI address was stored in PciAddress\r
-  @retval EFI_NOT_FOUND       Can not find the specific device path.\r
-\r
-**/\r
-EFI_STATUS\r
-GetHpcPciAddressFromRootBridge (\r
-  IN  PCI_IO_DEVICE                    *RootBridge,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL         *RemainingDevicePath,\r
-  OUT UINT64                           *PciAddress\r
-  )\r
-{\r
-  EFI_DEV_PATH_PTR          Node;\r
-  PCI_IO_DEVICE             *Temp;\r
-  EFI_DEVICE_PATH_PROTOCOL  *CurrentDevicePath;\r
-  LIST_ENTRY                *CurrentLink;\r
-  BOOLEAN                   MisMatch;\r
-\r
-  MisMatch          = FALSE;\r
-\r
-  CurrentDevicePath = RemainingDevicePath;\r
-  Node.DevPath      = CurrentDevicePath;\r
-  Temp              = NULL;\r
-\r
-  while (!IsDevicePathEnd (CurrentDevicePath)) {\r
-\r
-    CurrentLink   = RootBridge->ChildList.ForwardLink;\r
-    Node.DevPath  = CurrentDevicePath;\r
-\r
-    while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {\r
-      Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
-\r
-      if (Node.Pci->Device   == Temp->DeviceNumber &&\r
-          Node.Pci->Function == Temp->FunctionNumber) {\r
-        RootBridge = Temp;\r
-        break;\r
-      }\r
-\r
-      CurrentLink = CurrentLink->ForwardLink;\r
-    }\r
-\r
-    //\r
-    // Check if we find the bridge\r
-    //\r
-    if (CurrentLink == &RootBridge->ChildList) {\r
-\r
-      MisMatch = TRUE;\r
-      break;\r
-\r
-    }\r
-\r
-    CurrentDevicePath = NextDevicePathNode (CurrentDevicePath);\r
-  }\r
-\r
-  if (MisMatch) {\r
-\r
-    CurrentDevicePath = NextDevicePathNode (CurrentDevicePath);\r
-\r
-    if (IsDevicePathEnd (CurrentDevicePath)) {\r
-      *PciAddress = EFI_PCI_ADDRESS (RootBridge->BusNumber, Node.Pci->Device, Node.Pci->Function, 0);\r
-      return EFI_SUCCESS;\r
-    }\r
-\r
-    return EFI_NOT_FOUND;\r
-  }\r
 \r
-  if (Temp != NULL) {\r
-    *PciAddress = EFI_PCI_ADDRESS (Temp->BusNumber, Temp->DeviceNumber, Temp->FunctionNumber, 0);\r
-  } else {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-\r
-}\r
 \r
index 1a01e72b1e7f0186671c825a547316c4368b0323..c282381f85dc01f316a3a5347643bbe8f1a051f1 100644 (file)
@@ -255,23 +255,6 @@ ActiveVGADeviceOnTheRootBridge (
   IN PCI_IO_DEVICE        *RootBridge\r
   );\r
 \r
-/**\r
-  Get HPC PCI address according to its device path.\r
-\r
-  @param RootBridge           Root bridege Io instance.\r
-  @param RemainingDevicePath  Given searching device path.\r
-  @param PciAddress           Buffer holding searched result.\r
-\r
-  @retval EFI_SUCCESS         PCI address was stored in PciAddress.\r
-  @retval EFI_NOT_FOUND       Can not find the specific device path.\r
-\r
-**/\r
-EFI_STATUS\r
-GetHpcPciAddressFromRootBridge (\r
-  IN  PCI_IO_DEVICE                    *RootBridge,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL         *RemainingDevicePath,\r
-  OUT UINT64                           *PciAddress\r
-  );\r
 \r
 /**\r
   Destroy a pci device node.\r
index 87b0b9884adfb71408525cd5c10e125379704b94..291578c63cb9c06a2aff45706469edcc6aa02460 100644 (file)
@@ -2061,47 +2061,6 @@ PciIoSetBarAttributes (
   return EFI_SUCCESS;\r
 }\r
 \r
-/**\r
-  Program parent bridge's attribute recurrently.\r
-\r
-  @param PciIoDevice  Child Pci device instance\r
-  @param Operation    The operation to perform on the attributes for this PCI controller.\r
-  @param Attributes   The mask of attributes that are used for Set, Enable, and Disable\r
-                      operations.\r
-\r
-  @retval EFI_SUCCESS           The operation on the PCI controller's attributes was completed.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-  @retval EFI_UNSUPPORTED       one or more of the bits set in\r
-                                Attributes are not supported by this PCI controller or one of\r
-                                its parent bridges when Operation is Set, Enable or Disable.\r
-\r
-**/\r
-EFI_STATUS\r
-UpStreamBridgesAttributes (\r
-  IN PCI_IO_DEVICE                            *PciIoDevice,\r
-  IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION  Operation,\r
-  IN UINT64                                   Attributes\r
-  )\r
-{\r
-  PCI_IO_DEVICE       *Parent;\r
-  EFI_PCI_IO_PROTOCOL *PciIo;\r
-\r
-  Parent = PciIoDevice->Parent;\r
-\r
-  while (Parent != NULL && IS_PCI_BRIDGE (&Parent->Pci)) {\r
-\r
-    //\r
-    // Get the PciIo Protocol\r
-    //\r
-    PciIo = &Parent->PciIo;\r
-\r
-    PciIo->Attributes (PciIo, Operation, Attributes, NULL);\r
-\r
-    Parent = Parent->Parent;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
 \r
 /**\r
   Test whether two Pci devices has same parent bridge.\r
index b7e38ded3fa482b7d05e2ae3e8a08e60aacf0442..69e7c32881bf2a124adf38ad122797e7267e84aa 100644 (file)
@@ -646,27 +646,6 @@ PciIoSetBarAttributes (
   IN OUT UINT64                       *Length\r
   );\r
 \r
-/**\r
-  Program parent bridge's attribute recurrently.\r
-\r
-  @param PciIoDevice  Child Pci device instance\r
-  @param Operation    The operation to perform on the attributes for this PCI controller.\r
-  @param Attributes   The mask of attributes that are used for Set, Enable, and Disable\r
-                      operations.\r
-\r
-  @retval EFI_SUCCESS           The operation on the PCI controller's attributes was completed.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-  @retval EFI_UNSUPPORTED       one or more of the bits set in\r
-                                Attributes are not supported by this PCI controller or one of\r
-                                its parent bridges when Operation is Set, Enable or Disable.\r
-\r
-**/\r
-EFI_STATUS\r
-UpStreamBridgesAttributes (\r
-  IN PCI_IO_DEVICE                            *PciIoDevice,\r
-  IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION  Operation,\r
-  IN UINT64                                   Attributes\r
-  );\r
 \r
 /**\r
   Test whether two Pci devices has same parent bridge.\r