]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c
Fix comparisons of enumerated types which may cause warnings for some compilers.
[mirror_edk2.git] / PcAtChipsetPkg / PciHostBridgeDxe / PciRootBridgeIo.c
index b4da52eefe076899eb46dc440d47570378900f16..7946324d9f674525c5e098c43288ac21adcca8be 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI Root Bridge Io Protocol implementation\r
 \r
-Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are\r
 licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -770,7 +770,7 @@ RootBridgeIoCheckParameter (
   //\r
   // Check to see if Width is in the valid range\r
   //\r
-  if (Width < EfiPciWidthUint8 || Width >= EfiPciWidthMaximum) {\r
+  if ((UINT32)Width >= EfiPciWidthMaximum) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -1233,7 +1233,7 @@ RootBridgeIoPollMem (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (Width < 0 || Width > EfiPciWidthUint64) {\r
+  if ((UINT32)Width > EfiPciWidthUint64) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -1340,7 +1340,7 @@ RootBridgeIoPollIo (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (Width < 0 || Width > EfiPciWidthUint64) {\r
+  if ((UINT32)Width > EfiPciWidthUint64) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   \r
@@ -1561,7 +1561,7 @@ RootBridgeIoCopyMem (
   UINTN       Index;\r
   UINT64      Result;\r
 \r
-  if (Width < 0 || Width > EfiPciWidthUint64) {\r
+  if ((UINT32)Width > EfiPciWidthUint64) {\r
     return EFI_INVALID_PARAMETER;\r
   }    \r
 \r
@@ -1735,7 +1735,7 @@ RootBridgeIoMap (
   //\r
   // Make sure that Operation is valid\r
   //\r
-  if (Operation < 0 || Operation >= EfiPciOperationMaximum) {\r
+  if ((UINT32)Operation >= EfiPciOperationMaximum) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r