diff mbox

[edk2,19/47] MdeModulePkg/PciHostBridgeDxe: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-20-lersek@redhat.com
State Accepted
Commit 5074e4069ad47bba6bd7ae80ef0e970f7e7979ef
Headers show

Commit Message

Laszlo Ersek Oct. 26, 2016, 7:04 p.m. UTC
Cc: Feng Tian <feng.tian@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ni, Ruiyu Oct. 27, 2016, 1:49 a.m. UTC | #1
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>


Regards,
Ray

>-----Original Message-----

>From: Laszlo Ersek [mailto:lersek@redhat.com]

>Sent: Thursday, October 27, 2016 3:05 AM

>To: edk2-devel-01 <edk2-devel@ml01.01.org>

>Cc: Tian, Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Zeng, Star <star.zeng@intel.com>

>Subject: [PATCH 19/47] MdeModulePkg/PciHostBridgeDxe: rebase to ARRAY_SIZE()

>

>Cc: Feng Tian <feng.tian@intel.com>

>Cc: Ruiyu Ni <ruiyu.ni@intel.com>

>Cc: Star Zeng <star.zeng@intel.com>

>Contributed-under: TianoCore Contribution Agreement 1.0

>Signed-off-by: Laszlo Ersek <lersek@redhat.com>

>---

> MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 2 +-

> 1 file changed, 1 insertion(+), 1 deletion(-)

>

>diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c

>b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c

>index c866e8801607..9005deeac225 100644

>--- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c

>+++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c

>@@ -415,7 +415,7 @@ InitializePciHostBridge (

>     MemApertures[2] = &RootBridges[Index].PMem;

>     MemApertures[3] = &RootBridges[Index].PMemAbove4G;

>

>-    for (MemApertureIndex = 0; MemApertureIndex < sizeof (MemApertures) / sizeof (MemApertures[0]);

>MemApertureIndex++) {

>+    for (MemApertureIndex = 0; MemApertureIndex < ARRAY_SIZE (MemApertures); MemApertureIndex++) {

>       if (MemApertures[MemApertureIndex]->Base <= MemApertures[MemApertureIndex]->Limit) {

>         Status = AddMemoryMappedIoSpace (

>                    MemApertures[MemApertureIndex]->Base,

>--

>2.9.2

>


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
index c866e8801607..9005deeac225 100644
--- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
+++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
@@ -415,7 +415,7 @@  InitializePciHostBridge (
     MemApertures[2] = &RootBridges[Index].PMem;
     MemApertures[3] = &RootBridges[Index].PMemAbove4G;
 
-    for (MemApertureIndex = 0; MemApertureIndex < sizeof (MemApertures) / sizeof (MemApertures[0]); MemApertureIndex++) {
+    for (MemApertureIndex = 0; MemApertureIndex < ARRAY_SIZE (MemApertures); MemApertureIndex++) {
       if (MemApertures[MemApertureIndex]->Base <= MemApertures[MemApertureIndex]->Limit) {
         Status = AddMemoryMappedIoSpace (
                    MemApertures[MemApertureIndex]->Base,