]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 8 Dec 2016 08:17:22 +0000 (08:17 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 9 Dec 2016 14:51:36 +0000 (14:51 +0000)
Add missing EFIAPI modifiers to the functions that are exposed via the
PCI I/O protocol.

At the same time, add a missing UINT8 cast which breaks the build on
Visual Studio.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c

index 1e7244a129ae5a097e1aa5898be31920417a2a02..56482e3353c0f046ea4a71cba056aedbe3f1bbbc 100644 (file)
@@ -43,7 +43,7 @@ GetBarResource (
     return EFI_NOT_FOUND;\r
   }\r
 \r
-  BarIndex -= Dev->BarOffset;\r
+  BarIndex -= (UINT8)Dev->BarOffset;\r
 \r
   for (Desc = Dev->Device->Resources;\r
        Desc->Desc != ACPI_END_TAG_DESCRIPTOR;\r
@@ -61,6 +61,7 @@ GetBarResource (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoPollMem (\r
   IN  EFI_PCI_IO_PROTOCOL         *This,\r
   IN  EFI_PCI_IO_PROTOCOL_WIDTH   Width,\r
@@ -78,6 +79,7 @@ PciIoPollMem (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoPollIo (\r
   IN  EFI_PCI_IO_PROTOCOL         *This,\r
   IN  EFI_PCI_IO_PROTOCOL_WIDTH   Width,\r
@@ -95,6 +97,7 @@ PciIoPollIo (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoMemRW (\r
   IN  EFI_PCI_IO_PROTOCOL_WIDTH   Width,\r
   IN  UINTN                       Count,\r
@@ -145,6 +148,7 @@ PciIoMemRW (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoMemRead (\r
   IN     EFI_PCI_IO_PROTOCOL          *This,\r
   IN     EFI_PCI_IO_PROTOCOL_WIDTH    Width,\r
@@ -211,6 +215,7 @@ PciIoMemRead (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoMemWrite (\r
   IN     EFI_PCI_IO_PROTOCOL          *This,\r
   IN     EFI_PCI_IO_PROTOCOL_WIDTH    Width,\r
@@ -277,6 +282,7 @@ PciIoMemWrite (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoIoRead (\r
   IN EFI_PCI_IO_PROTOCOL              *This,\r
   IN     EFI_PCI_IO_PROTOCOL_WIDTH    Width,\r
@@ -292,6 +298,7 @@ PciIoIoRead (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoIoWrite (\r
   IN     EFI_PCI_IO_PROTOCOL          *This,\r
   IN     EFI_PCI_IO_PROTOCOL_WIDTH    Width,\r
@@ -307,6 +314,7 @@ PciIoIoWrite (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoPciRead (\r
   IN     EFI_PCI_IO_PROTOCOL        *This,\r
   IN     EFI_PCI_IO_PROTOCOL_WIDTH  Width,\r
@@ -342,6 +350,7 @@ PciIoPciRead (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoPciWrite (\r
   IN EFI_PCI_IO_PROTOCOL              *This,\r
   IN     EFI_PCI_IO_PROTOCOL_WIDTH    Width,\r
@@ -369,6 +378,7 @@ PciIoPciWrite (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoCopyMem (\r
   IN EFI_PCI_IO_PROTOCOL              *This,\r
   IN     EFI_PCI_IO_PROTOCOL_WIDTH    Width,\r
@@ -385,6 +395,7 @@ PciIoCopyMem (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 CoherentPciIoMap (\r
   IN     EFI_PCI_IO_PROTOCOL            *This,\r
   IN     EFI_PCI_IO_PROTOCOL_OPERATION  Operation,\r
@@ -450,6 +461,7 @@ CoherentPciIoMap (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 CoherentPciIoUnmap (\r
   IN  EFI_PCI_IO_PROTOCOL          *This,\r
   IN  VOID                         *Mapping\r
@@ -472,6 +484,7 @@ CoherentPciIoUnmap (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 CoherentPciIoAllocateBuffer (\r
   IN  EFI_PCI_IO_PROTOCOL         *This,\r
   IN  EFI_ALLOCATE_TYPE           Type,\r
@@ -513,6 +526,7 @@ CoherentPciIoAllocateBuffer (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 CoherentPciIoFreeBuffer (\r
   IN  EFI_PCI_IO_PROTOCOL         *This,\r
   IN  UINTN                       Pages,\r
@@ -526,6 +540,7 @@ CoherentPciIoFreeBuffer (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoFlush (\r
   IN EFI_PCI_IO_PROTOCOL          *This\r
   )\r
@@ -535,6 +550,7 @@ PciIoFlush (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoGetLocation (\r
   IN   EFI_PCI_IO_PROTOCOL  *This,\r
   OUT  UINTN                *SegmentNumber,\r
@@ -560,6 +576,7 @@ PciIoGetLocation (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoAttributes (\r
   IN  EFI_PCI_IO_PROTOCOL                      *This,\r
   IN  EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION  Operation,\r
@@ -616,6 +633,7 @@ PciIoAttributes (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoGetBarAttributes (\r
   IN EFI_PCI_IO_PROTOCOL             *This,\r
   IN  UINT8                          BarIndex,\r
@@ -666,6 +684,7 @@ PciIoGetBarAttributes (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 PciIoSetBarAttributes (\r
   IN     EFI_PCI_IO_PROTOCOL          *This,\r
   IN     UINT64                       Attributes,\r