public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case
@ 2016-12-12  1:26 Hao Wu
  2016-12-12  3:18 ` Ni, Ruiyu
  0 siblings, 1 reply; 2+ messages in thread
From: Hao Wu @ 2016-12-12  1:26 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Ard Biesheuvel, Ruiyu Ni

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>
---
 .../NonDiscoverablePciDeviceIo.c                   | 48 +++++++++++-----------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
index 56482e3..82ee9d1 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
@@ -189,22 +189,22 @@ PciIoMemRead (
   }
 
   switch (Width) {
-  case EfiPciWidthUint8:
-  case EfiPciWidthUint16:
-  case EfiPciWidthUint32:
-  case EfiPciWidthUint64:
+  case EfiPciIoWidthUint8:
+  case EfiPciIoWidthUint16:
+  case EfiPciIoWidthUint32:
+  case EfiPciIoWidthUint64:
     return PciIoMemRW (Width, Count, 1, Buffer, 1, Address);
 
-  case EfiPciWidthFifoUint8:
-  case EfiPciWidthFifoUint16:
-  case EfiPciWidthFifoUint32:
-  case EfiPciWidthFifoUint64:
+  case EfiPciIoWidthFifoUint8:
+  case EfiPciIoWidthFifoUint16:
+  case EfiPciIoWidthFifoUint32:
+  case EfiPciIoWidthFifoUint64:
     return PciIoMemRW (Width, Count, 1, Buffer, 0, Address);
 
-  case EfiPciWidthFillUint8:
-  case EfiPciWidthFillUint16:
-  case EfiPciWidthFillUint32:
-  case EfiPciWidthFillUint64:
+  case EfiPciIoWidthFillUint8:
+  case EfiPciIoWidthFillUint16:
+  case EfiPciIoWidthFillUint32:
+  case EfiPciIoWidthFillUint64:
     return PciIoMemRW (Width, Count, 0, Buffer, 1, Address);
 
   default:
@@ -256,22 +256,22 @@ PciIoMemWrite (
   }
 
   switch (Width) {
-  case EfiPciWidthUint8:
-  case EfiPciWidthUint16:
-  case EfiPciWidthUint32:
-  case EfiPciWidthUint64:
+  case EfiPciIoWidthUint8:
+  case EfiPciIoWidthUint16:
+  case EfiPciIoWidthUint32:
+  case EfiPciIoWidthUint64:
     return PciIoMemRW (Width, Count, 1, Address, 1, Buffer);
 
-  case EfiPciWidthFifoUint8:
-  case EfiPciWidthFifoUint16:
-  case EfiPciWidthFifoUint32:
-  case EfiPciWidthFifoUint64:
+  case EfiPciIoWidthFifoUint8:
+  case EfiPciIoWidthFifoUint16:
+  case EfiPciIoWidthFifoUint32:
+  case EfiPciIoWidthFifoUint64:
     return PciIoMemRW (Width, Count, 0, Address, 1, Buffer);
 
-  case EfiPciWidthFillUint8:
-  case EfiPciWidthFillUint16:
-  case EfiPciWidthFillUint32:
-  case EfiPciWidthFillUint64:
+  case EfiPciIoWidthFillUint8:
+  case EfiPciIoWidthFillUint16:
+  case EfiPciIoWidthFillUint32:
+  case EfiPciIoWidthFillUint64:
     return PciIoMemRW (Width, Count, 1, Address, 0, Buffer);
 
   default:
-- 
1.9.5.msysgit.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-12  3:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12  1:26 [PATCH] MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case Hao Wu
2016-12-12  3:18 ` Ni, Ruiyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox