From aa75dfeccdd9c88bd64431b1290faf7574854337 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Fri, 15 Jan 2010 08:03:23 +0000 Subject: Fix some coding style issues in MdeModulePkg. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9774 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c | 2 +- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 6 +++--- MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h | 15 +++++++++------ 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'MdeModulePkg/Bus/Pci') diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c index 25387bd257..81a79e6c86 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c @@ -267,7 +267,7 @@ RegisterPciDevice ( ParrentPciIoDevice = PciIoDevice->Parent; ParrentPciIo = &(ParrentPciIoDevice->PciIo); ParrentPciIo->Pci.Read (PciIo, EfiPciIoWidthUint32, ParrentPciIoDevice->PciExpressCapabilityOffset + EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_2_OFFSET, 1, &Data32); - if (Data32 & EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_2_ARI_FORWARDING) { + if ((Data32 & EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_2_ARI_FORWARDING) != 0) { // // ARI forward support in bridge, so enable it. // diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index ef0a5a2d39..bf0e67e521 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -1420,7 +1420,7 @@ PciIovParseVfBar ( } PciIoDevice->VfPciBar[BarIndex].Offset = (UINT8) Offset; - if (Value & 0x01) { + if ((Value & 0x01) != 0) { // // Device I/Os. Impossible // @@ -1439,7 +1439,7 @@ PciIovParseVfBar ( //memory space; anywhere in 32 bit address space // case 0x00: - if (Value & 0x08) { + if ((Value & 0x08) != 0) { PciIoDevice->VfPciBar[BarIndex].BarType = PciBarTypePMem32; } else { PciIoDevice->VfPciBar[BarIndex].BarType = PciBarTypeMem32; @@ -1465,7 +1465,7 @@ PciIovParseVfBar ( // memory space; anywhere in 64 bit address space // case 0x04: - if (Value & 0x08) { + if ((Value & 0x08) != 0) { PciIoDevice->VfPciBar[BarIndex].BarType = PciBarTypePMem64; } else { PciIoDevice->VfPciBar[BarIndex].BarType = PciBarTypeMem64; diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h index faa6c0d60c..7a123b6553 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h @@ -179,12 +179,15 @@ CreateResourceNode ( This function is used to extract resource request from IOV VF device node list. - @param Bridge Pci device instance. - @param IoNode Resource info node for IO. - @param Mem32Node Resource info node for 32-bit memory. - @param PMem32Node Resource info node for 32-bit Prefetchable Memory. - @param Mem64Node Resource info node for 64-bit memory. - @param PMem64Node Resource info node for 64-bit Prefetchable Memory. + @param PciDev Pci device instance. + @param Length Length of Io/Memory resource. + @param Alignment Alignment of resource. + @param Bar Bar index. + @param ResType Type of resource: IO/Memory. + @param ResUsage Resource usage. + + @return PCI resource node created for given PCI device. + NULL means PCI resource node is not created. **/ PCI_RESOURCE_NODE * -- cgit v1.2.3