]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PcAtChipsetPkg/8259InterruptControllerDxe/8259.c
Fix comparisons of enumerated types which may cause warnings for some compilers.
[mirror_edk2.git] / PcAtChipsetPkg / 8259InterruptControllerDxe / 8259.c
index 5a862d13b8021d823b59c48ecafbf4e90ab4bb77..447106afe92ce60eff749a6e5296ec0c7b6c6fee 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This contains the installation function for the driver.\r
 \r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are 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
@@ -413,7 +413,7 @@ Interrupt8259GetVector (
   OUT UINT8                     *Vector\r
   )\r
 {\r
-  if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+  if ((UINT32)Irq > Efi8259Irq15) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -445,7 +445,7 @@ Interrupt8259EnableIrq (
   IN BOOLEAN                   LevelTriggered\r
   )\r
 {\r
-  if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+  if ((UINT32)Irq > Efi8259Irq15) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -478,7 +478,7 @@ Interrupt8259DisableIrq (
   IN EFI_8259_IRQ              Irq\r
   )\r
 {\r
-  if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+  if ((UINT32)Irq > Efi8259Irq15) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -555,7 +555,7 @@ Interrupt8259EndOfInterrupt (
   IN EFI_8259_IRQ              Irq\r
   )\r
 {\r
-  if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+  if ((UINT32)Irq > Efi8259Irq15) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r