]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case
authorHao Wu <hao.a.wu@intel.com>
Mon, 12 Dec 2016 01:07:52 +0000 (09:07 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 13 Dec 2016 03:37:24 +0000 (11:37 +0800)
Fix switch/case statement type mismatch in functions PciIoMemRead &
PciIoMemWrite.

Parameter 'Width' is of enum type EFI_PCI_IO_PROTOCOL_WIDTH, but the enum
type provided in 'switch (Width)' block is of type
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c

index 56482e3353c0f046ea4a71cba056aedbe3f1bbbc..82ee9d119011157402bd463b19f039ec3247d15b 100644 (file)
@@ -189,22 +189,22 @@ PciIoMemRead (
   }\r
 \r
   switch (Width) {\r
-  case EfiPciWidthUint8:\r
-  case EfiPciWidthUint16:\r
-  case EfiPciWidthUint32:\r
-  case EfiPciWidthUint64:\r
+  case EfiPciIoWidthUint8:\r
+  case EfiPciIoWidthUint16:\r
+  case EfiPciIoWidthUint32:\r
+  case EfiPciIoWidthUint64:\r
     return PciIoMemRW (Width, Count, 1, Buffer, 1, Address);\r
 \r
-  case EfiPciWidthFifoUint8:\r
-  case EfiPciWidthFifoUint16:\r
-  case EfiPciWidthFifoUint32:\r
-  case EfiPciWidthFifoUint64:\r
+  case EfiPciIoWidthFifoUint8:\r
+  case EfiPciIoWidthFifoUint16:\r
+  case EfiPciIoWidthFifoUint32:\r
+  case EfiPciIoWidthFifoUint64:\r
     return PciIoMemRW (Width, Count, 1, Buffer, 0, Address);\r
 \r
-  case EfiPciWidthFillUint8:\r
-  case EfiPciWidthFillUint16:\r
-  case EfiPciWidthFillUint32:\r
-  case EfiPciWidthFillUint64:\r
+  case EfiPciIoWidthFillUint8:\r
+  case EfiPciIoWidthFillUint16:\r
+  case EfiPciIoWidthFillUint32:\r
+  case EfiPciIoWidthFillUint64:\r
     return PciIoMemRW (Width, Count, 0, Buffer, 1, Address);\r
 \r
   default:\r
@@ -256,22 +256,22 @@ PciIoMemWrite (
   }\r
 \r
   switch (Width) {\r
-  case EfiPciWidthUint8:\r
-  case EfiPciWidthUint16:\r
-  case EfiPciWidthUint32:\r
-  case EfiPciWidthUint64:\r
+  case EfiPciIoWidthUint8:\r
+  case EfiPciIoWidthUint16:\r
+  case EfiPciIoWidthUint32:\r
+  case EfiPciIoWidthUint64:\r
     return PciIoMemRW (Width, Count, 1, Address, 1, Buffer);\r
 \r
-  case EfiPciWidthFifoUint8:\r
-  case EfiPciWidthFifoUint16:\r
-  case EfiPciWidthFifoUint32:\r
-  case EfiPciWidthFifoUint64:\r
+  case EfiPciIoWidthFifoUint8:\r
+  case EfiPciIoWidthFifoUint16:\r
+  case EfiPciIoWidthFifoUint32:\r
+  case EfiPciIoWidthFifoUint64:\r
     return PciIoMemRW (Width, Count, 0, Address, 1, Buffer);\r
 \r
-  case EfiPciWidthFillUint8:\r
-  case EfiPciWidthFillUint16:\r
-  case EfiPciWidthFillUint32:\r
-  case EfiPciWidthFillUint64:\r
+  case EfiPciIoWidthFillUint8:\r
+  case EfiPciIoWidthFillUint16:\r
+  case EfiPciIoWidthFillUint32:\r
+  case EfiPciIoWidthFillUint64:\r
     return PciIoMemRW (Width, Count, 1, Address, 0, Buffer);\r
 \r
   default:\r