Revision: 14143
          http://edk2.svn.sourceforge.net/edk2/?rev=14143&view=rev
Author:   ydong10
Date:     2013-02-21 05:54:24 +0000 (Thu, 21 Feb 2013)
Log Message:
-----------
Refine the code to avoid error report.

Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Ni Ruiyu <[email protected]>

Modified Paths:
--------------
    trunk/edk2/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c
    trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c

Modified: trunk/edk2/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c
===================================================================
--- trunk/edk2/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c       
2013-02-21 05:48:37 UTC (rev 14142)
+++ trunk/edk2/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c       
2013-02-21 05:54:24 UTC (rev 14143)
@@ -3,7 +3,7 @@
   Child device(Disk, CDROM, etc) enumeration and child handler installation, 
and 
   driver stop.
     
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
   which accompanies this distribution.  The full text of the license may be 
found at
@@ -719,6 +719,7 @@
     //
     for (IdeDevice = BeginningIdeDevice; IdeDevice <= EndIdeDevice; 
IdeDevice++) {
 
+      ASSERT (IdeChannel * 2 + IdeDevice < MAX_IDE_DEVICE);
       if (IdeBusDriverPrivateData->DeviceProcessed[IdeChannel * 2 + 
IdeDevice]) {
         continue;
       }
@@ -738,6 +739,7 @@
         continue;
       }
 
+      ASSERT (IdeChannel < IdeMaxChannel && IdeDevice < IdeMaxDevice);
       IdeBlkIoDevicePtr = IdeBlkIoDevice[IdeChannel][IdeDevice];
 
       //

Modified: trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c  2013-02-21 05:48:37 UTC 
(rev 14142)
+++ trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c  2013-02-21 05:54:24 UTC 
(rev 14143)
@@ -2,7 +2,7 @@
 
     Usb Bus Driver Binding and Bus IO Protocol.
 
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
@@ -964,6 +964,7 @@
     // The EFI_USB2_HC_PROTOCOL is produced for XHCI support.
     // Then its max supported devices are 256. Otherwise it's 128.
     //
+    ASSERT (UsbBus->Usb2Hc != NULL);
     if (UsbBus->Usb2Hc->MajorRevision == 0x3) {
       UsbBus->MaxDevices = 256;
     }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to