mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case
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>
This commit is contained in:
parent
2961c65425
commit
82bf462e3a
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue