From 9b6483237984d9819809eb13119db8fb1026be31 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Wed, 25 Jan 2017 15:22:54 +0800 Subject: MdeModulePkg/PciSioSerialDxe: Use MAX_UINT8 instead of PCI_BAR_ALL When BarIndex equals to 0xFF, default value 0 is used as the BAR index. Though PCI_BAR_ALL and MAX_UINT8 shares the same value, using PCI_BAR_ALL is like to match any BAR not BAR 0, it's more proper to use MAX_UINT8 here. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Feng Tian --- MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MdeModulePkg/Bus/Pci') diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c index 65ddf5dc2b..a9dc8274d9 100644 --- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c +++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c @@ -473,7 +473,7 @@ CreateSerialDevice ( // For PCI serial device, use the information from PCD // if (PciSerialParameter != NULL) { - BarIndex = (PciSerialParameter->BarIndex == PCI_BAR_ALL) ? 0 : PciSerialParameter->BarIndex; + BarIndex = (PciSerialParameter->BarIndex == MAX_UINT8) ? 0 : PciSerialParameter->BarIndex; Offset = PciSerialParameter->Offset; if (PciSerialParameter->RegisterStride != 0) { SerialDevice->RegisterStride = PciSerialParameter->RegisterStride; -- cgit v1.2.3