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) {
|
switch (Width) {
|
||||||
case EfiPciWidthUint8:
|
case EfiPciIoWidthUint8:
|
||||||
case EfiPciWidthUint16:
|
case EfiPciIoWidthUint16:
|
||||||
case EfiPciWidthUint32:
|
case EfiPciIoWidthUint32:
|
||||||
case EfiPciWidthUint64:
|
case EfiPciIoWidthUint64:
|
||||||
return PciIoMemRW (Width, Count, 1, Buffer, 1, Address);
|
return PciIoMemRW (Width, Count, 1, Buffer, 1, Address);
|
||||||
|
|
||||||
case EfiPciWidthFifoUint8:
|
case EfiPciIoWidthFifoUint8:
|
||||||
case EfiPciWidthFifoUint16:
|
case EfiPciIoWidthFifoUint16:
|
||||||
case EfiPciWidthFifoUint32:
|
case EfiPciIoWidthFifoUint32:
|
||||||
case EfiPciWidthFifoUint64:
|
case EfiPciIoWidthFifoUint64:
|
||||||
return PciIoMemRW (Width, Count, 1, Buffer, 0, Address);
|
return PciIoMemRW (Width, Count, 1, Buffer, 0, Address);
|
||||||
|
|
||||||
case EfiPciWidthFillUint8:
|
case EfiPciIoWidthFillUint8:
|
||||||
case EfiPciWidthFillUint16:
|
case EfiPciIoWidthFillUint16:
|
||||||
case EfiPciWidthFillUint32:
|
case EfiPciIoWidthFillUint32:
|
||||||
case EfiPciWidthFillUint64:
|
case EfiPciIoWidthFillUint64:
|
||||||
return PciIoMemRW (Width, Count, 0, Buffer, 1, Address);
|
return PciIoMemRW (Width, Count, 0, Buffer, 1, Address);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -256,22 +256,22 @@ PciIoMemWrite (
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Width) {
|
switch (Width) {
|
||||||
case EfiPciWidthUint8:
|
case EfiPciIoWidthUint8:
|
||||||
case EfiPciWidthUint16:
|
case EfiPciIoWidthUint16:
|
||||||
case EfiPciWidthUint32:
|
case EfiPciIoWidthUint32:
|
||||||
case EfiPciWidthUint64:
|
case EfiPciIoWidthUint64:
|
||||||
return PciIoMemRW (Width, Count, 1, Address, 1, Buffer);
|
return PciIoMemRW (Width, Count, 1, Address, 1, Buffer);
|
||||||
|
|
||||||
case EfiPciWidthFifoUint8:
|
case EfiPciIoWidthFifoUint8:
|
||||||
case EfiPciWidthFifoUint16:
|
case EfiPciIoWidthFifoUint16:
|
||||||
case EfiPciWidthFifoUint32:
|
case EfiPciIoWidthFifoUint32:
|
||||||
case EfiPciWidthFifoUint64:
|
case EfiPciIoWidthFifoUint64:
|
||||||
return PciIoMemRW (Width, Count, 0, Address, 1, Buffer);
|
return PciIoMemRW (Width, Count, 0, Address, 1, Buffer);
|
||||||
|
|
||||||
case EfiPciWidthFillUint8:
|
case EfiPciIoWidthFillUint8:
|
||||||
case EfiPciWidthFillUint16:
|
case EfiPciIoWidthFillUint16:
|
||||||
case EfiPciWidthFillUint32:
|
case EfiPciIoWidthFillUint32:
|
||||||
case EfiPciWidthFillUint64:
|
case EfiPciIoWidthFillUint64:
|
||||||
return PciIoMemRW (Width, Count, 1, Address, 0, Buffer);
|
return PciIoMemRW (Width, Count, 1, Address, 0, Buffer);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue