summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-26 18:55:37 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-27 11:10:55 +0200
commit60a2d24822b5029644edc80dd767f405a74f35ee (patch)
tree3105c43e779374b68114bf290a65cd5c32754f33 /MdeModulePkg/Bus
parent5074e4069ad47bba6bd7ae80ef0e970f7e7979ef (diff)
downloadedk2-60a2d24822b5029644edc80dd767f405a74f35ee.tar.gz
edk2-60a2d24822b5029644edc80dd767f405a74f35ee.tar.bz2
edk2-60a2d24822b5029644edc80dd767f405a74f35ee.zip
MdeModulePkg/UsbBusDxe: rebase to ARRAY_SIZE()
Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c4
1 files 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)) {