Revision: 17956
          http://sourceforge.net/p/edk2/code/17956
Author:   lersek
Date:     2015-07-14 12:02:01 +0000 (Tue, 14 Jul 2015)
Log Message:
-----------
OvmfPkg: PciHostBridgeDxe: kill RootBridgeNumber and RootBridgeAttribute

There is no need to store these constants in dedicated static storage
duration objects; we can simply open-code them, simplifying the code.

Cc: Jordan Justen <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Regression-tested-by: Gabriel Somlo <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>

Modified Paths:
--------------
    trunk/edk2/OvmfPkg/PciHostBridgeDxe/PciHostBridge.c

Modified: trunk/edk2/OvmfPkg/PciHostBridgeDxe/PciHostBridge.c
===================================================================
--- trunk/edk2/OvmfPkg/PciHostBridgeDxe/PciHostBridge.c 2015-07-14 12:01:57 UTC 
(rev 17955)
+++ trunk/edk2/OvmfPkg/PciHostBridgeDxe/PciHostBridge.c 2015-07-14 12:02:01 UTC 
(rev 17956)
@@ -18,17 +18,10 @@
 #include "PciHostBridge.h"
 
 //
-// Hard code: Root Bridge Number within the host bridge
-//            Root Bridge's attribute
-//            Root Bridge's device path
+// Hard code: Root Bridge's device path
 //            Root Bridge's resource aperture
 //
-UINTN RootBridgeNumber = 1;
 
-UINT64 RootBridgeAttribute[1] = {
-  EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM
-};
-
 EFI_PCI_ROOT_BRIDGE_DEVICE_PATH mEfiPciRootBridgeDevicePath[1] = {
   {
     {
@@ -117,7 +110,7 @@
     return EFI_OUT_OF_RESOURCES;
   }
 
-  HostBridge->RootBridgeNumber = RootBridgeNumber;
+  HostBridge->RootBridgeNumber = 1;
   InitializeListHead (&HostBridge->Head);
 
   Status = gBS->InstallMultipleProtocolInterfaces (
@@ -148,7 +141,7 @@
     RootBridgeConstructor (
       &PrivateData->Io,
       HostBridge->HostBridgeHandle,
-      RootBridgeAttribute[Loop2],
+      EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM,
       &mResAperture[Loop2]
       );
 


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to