From 60a2d24822b5029644edc80dd767f405a74f35ee Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 Oct 2016 18:55:37 +0200 Subject: [PATCH] MdeModulePkg/UsbBusDxe: rebase to ARRAY_SIZE() Cc: Feng Tian Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Feng Tian Reviewed-by: Star Zeng Reviewed-by: Jordan Justen --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c index f51a51f191..fabb441570 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c @@ -884,7 +884,7 @@ UsbHubClearPortChange ( // It may lead to extra port state report. USB bus should // be able to handle this. // - for (Index = 0; Index < sizeof (mHubFeatureMap) / sizeof (mHubFeatureMap[0]); Index++) { + for (Index = 0; Index < ARRAY_SIZE (mHubFeatureMap); Index++) { Map = &mHubFeatureMap[Index]; if (USB_BIT_IS_SET (PortState.PortChangeStatus, Map->ChangedBit)) { @@ -1180,7 +1180,7 @@ UsbRootHubClearPortChange ( // It may lead to extra port state report. USB bus should // be able to handle this. // - for (Index = 0; Index < sizeof (mRootHubFeatureMap) / sizeof (mRootHubFeatureMap[0]); Index++) { + for (Index = 0; Index < ARRAY_SIZE (mRootHubFeatureMap); Index++) { Map = &mRootHubFeatureMap[Index]; if (USB_BIT_IS_SET (PortState.PortChangeStatus, Map->ChangedBit)) {