* [PATCH] MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers
@ 2016-12-08 8:17 Ard Biesheuvel
2016-12-08 9:25 ` Bi, Dandan
0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2016-12-08 8:17 UTC (permalink / raw)
To: edk2-devel, ruiyu.ni; +Cc: Ard Biesheuvel
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>
---
Apologies for the breakage.
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c | 21 +++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
index 1e7244a129ae..56482e3353c0 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
@@ -43,7 +43,7 @@ GetBarResource (
return EFI_NOT_FOUND;
}
- BarIndex -= Dev->BarOffset;
+ BarIndex -= (UINT8)Dev->BarOffset;
for (Desc = Dev->Device->Resources;
Desc->Desc != ACPI_END_TAG_DESCRIPTOR;
@@ -61,6 +61,7 @@ GetBarResource (
STATIC
EFI_STATUS
+EFIAPI
PciIoPollMem (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -78,6 +79,7 @@ PciIoPollMem (
STATIC
EFI_STATUS
+EFIAPI
PciIoPollIo (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -95,6 +97,7 @@ PciIoPollIo (
STATIC
EFI_STATUS
+EFIAPI
PciIoMemRW (
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINTN Count,
@@ -145,6 +148,7 @@ PciIoMemRW (
STATIC
EFI_STATUS
+EFIAPI
PciIoMemRead (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -211,6 +215,7 @@ PciIoMemRead (
STATIC
EFI_STATUS
+EFIAPI
PciIoMemWrite (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -277,6 +282,7 @@ PciIoMemWrite (
STATIC
EFI_STATUS
+EFIAPI
PciIoIoRead (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -292,6 +298,7 @@ PciIoIoRead (
STATIC
EFI_STATUS
+EFIAPI
PciIoIoWrite (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -307,6 +314,7 @@ PciIoIoWrite (
STATIC
EFI_STATUS
+EFIAPI
PciIoPciRead (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -342,6 +350,7 @@ PciIoPciRead (
STATIC
EFI_STATUS
+EFIAPI
PciIoPciWrite (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -369,6 +378,7 @@ PciIoPciWrite (
STATIC
EFI_STATUS
+EFIAPI
PciIoCopyMem (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -385,6 +395,7 @@ PciIoCopyMem (
STATIC
EFI_STATUS
+EFIAPI
CoherentPciIoMap (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_OPERATION Operation,
@@ -450,6 +461,7 @@ CoherentPciIoMap (
STATIC
EFI_STATUS
+EFIAPI
CoherentPciIoUnmap (
IN EFI_PCI_IO_PROTOCOL *This,
IN VOID *Mapping
@@ -472,6 +484,7 @@ CoherentPciIoUnmap (
STATIC
EFI_STATUS
+EFIAPI
CoherentPciIoAllocateBuffer (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_ALLOCATE_TYPE Type,
@@ -513,6 +526,7 @@ CoherentPciIoAllocateBuffer (
STATIC
EFI_STATUS
+EFIAPI
CoherentPciIoFreeBuffer (
IN EFI_PCI_IO_PROTOCOL *This,
IN UINTN Pages,
@@ -526,6 +540,7 @@ CoherentPciIoFreeBuffer (
STATIC
EFI_STATUS
+EFIAPI
PciIoFlush (
IN EFI_PCI_IO_PROTOCOL *This
)
@@ -535,6 +550,7 @@ PciIoFlush (
STATIC
EFI_STATUS
+EFIAPI
PciIoGetLocation (
IN EFI_PCI_IO_PROTOCOL *This,
OUT UINTN *SegmentNumber,
@@ -560,6 +576,7 @@ PciIoGetLocation (
STATIC
EFI_STATUS
+EFIAPI
PciIoAttributes (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation,
@@ -616,6 +633,7 @@ PciIoAttributes (
STATIC
EFI_STATUS
+EFIAPI
PciIoGetBarAttributes (
IN EFI_PCI_IO_PROTOCOL *This,
IN UINT8 BarIndex,
@@ -666,6 +684,7 @@ PciIoGetBarAttributes (
STATIC
EFI_STATUS
+EFIAPI
PciIoSetBarAttributes (
IN EFI_PCI_IO_PROTOCOL *This,
IN UINT64 Attributes,
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers
2016-12-08 8:17 [PATCH] MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers Ard Biesheuvel
@ 2016-12-08 9:25 ` Bi, Dandan
2016-12-09 14:50 ` Ard Biesheuvel
0 siblings, 1 reply; 3+ messages in thread
From: Bi, Dandan @ 2016-12-08 9:25 UTC (permalink / raw)
To: Ard Biesheuvel, edk2-devel@lists.01.org, Ni, Ruiyu
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel
Sent: Thursday, December 8, 2016 4:17 PM
To: edk2-devel@lists.01.org; Ni, Ruiyu <ruiyu.ni@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [edk2] [PATCH] MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers
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>
---
Apologies for the breakage.
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c | 21 +++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
index 1e7244a129ae..56482e3353c0 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePc
+++ iDeviceIo.c
@@ -43,7 +43,7 @@ GetBarResource (
return EFI_NOT_FOUND;
}
- BarIndex -= Dev->BarOffset;
+ BarIndex -= (UINT8)Dev->BarOffset;
for (Desc = Dev->Device->Resources;
Desc->Desc != ACPI_END_TAG_DESCRIPTOR; @@ -61,6 +61,7 @@ GetBarResource (
STATIC
EFI_STATUS
+EFIAPI
PciIoPollMem (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -78,6 +79,7 @@ PciIoPollMem (
STATIC
EFI_STATUS
+EFIAPI
PciIoPollIo (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -95,6 +97,7 @@ PciIoPollIo (
STATIC
EFI_STATUS
+EFIAPI
PciIoMemRW (
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINTN Count,
@@ -145,6 +148,7 @@ PciIoMemRW (
STATIC
EFI_STATUS
+EFIAPI
PciIoMemRead (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -211,6 +215,7 @@ PciIoMemRead (
STATIC
EFI_STATUS
+EFIAPI
PciIoMemWrite (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -277,6 +282,7 @@ PciIoMemWrite (
STATIC
EFI_STATUS
+EFIAPI
PciIoIoRead (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -292,6 +298,7 @@ PciIoIoRead (
STATIC
EFI_STATUS
+EFIAPI
PciIoIoWrite (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -307,6 +314,7 @@ PciIoIoWrite (
STATIC
EFI_STATUS
+EFIAPI
PciIoPciRead (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -342,6 +350,7 @@ PciIoPciRead (
STATIC
EFI_STATUS
+EFIAPI
PciIoPciWrite (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -369,6 +378,7 @@ PciIoPciWrite (
STATIC
EFI_STATUS
+EFIAPI
PciIoCopyMem (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
@@ -385,6 +395,7 @@ PciIoCopyMem (
STATIC
EFI_STATUS
+EFIAPI
CoherentPciIoMap (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_OPERATION Operation,
@@ -450,6 +461,7 @@ CoherentPciIoMap (
STATIC
EFI_STATUS
+EFIAPI
CoherentPciIoUnmap (
IN EFI_PCI_IO_PROTOCOL *This,
IN VOID *Mapping
@@ -472,6 +484,7 @@ CoherentPciIoUnmap (
STATIC
EFI_STATUS
+EFIAPI
CoherentPciIoAllocateBuffer (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_ALLOCATE_TYPE Type,
@@ -513,6 +526,7 @@ CoherentPciIoAllocateBuffer (
STATIC
EFI_STATUS
+EFIAPI
CoherentPciIoFreeBuffer (
IN EFI_PCI_IO_PROTOCOL *This,
IN UINTN Pages,
@@ -526,6 +540,7 @@ CoherentPciIoFreeBuffer (
STATIC
EFI_STATUS
+EFIAPI
PciIoFlush (
IN EFI_PCI_IO_PROTOCOL *This
)
@@ -535,6 +550,7 @@ PciIoFlush (
STATIC
EFI_STATUS
+EFIAPI
PciIoGetLocation (
IN EFI_PCI_IO_PROTOCOL *This,
OUT UINTN *SegmentNumber,
@@ -560,6 +576,7 @@ PciIoGetLocation (
STATIC
EFI_STATUS
+EFIAPI
PciIoAttributes (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation, @@ -616,6 +633,7 @@ PciIoAttributes (
STATIC
EFI_STATUS
+EFIAPI
PciIoGetBarAttributes (
IN EFI_PCI_IO_PROTOCOL *This,
IN UINT8 BarIndex,
@@ -666,6 +684,7 @@ PciIoGetBarAttributes (
STATIC
EFI_STATUS
+EFIAPI
PciIoSetBarAttributes (
IN EFI_PCI_IO_PROTOCOL *This,
IN UINT64 Attributes,
--
2.7.4
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers
2016-12-08 9:25 ` Bi, Dandan
@ 2016-12-09 14:50 ` Ard Biesheuvel
0 siblings, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2016-12-09 14:50 UTC (permalink / raw)
To: Bi, Dandan, Ni, Ruiyu; +Cc: edk2-devel@lists.01.org
On 8 December 2016 at 09:25, Bi, Dandan <dandan.bi@intel.com> wrote:
> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
>
Given that this patch fixes build issues reported by Ruiyi, I am going
to assume Dandan's Reviewed-by is sufficient, and merge this patch to
master
Thanks,
Ard.
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel
> Sent: Thursday, December 8, 2016 4:17 PM
> To: edk2-devel@lists.01.org; Ni, Ruiyu <ruiyu.ni@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Subject: [edk2] [PATCH] MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers
>
> 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>
> ---
> Apologies for the breakage.
>
> MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c | 21 +++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
> index 1e7244a129ae..56482e3353c0 100644
> --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePc
> +++ iDeviceIo.c
> @@ -43,7 +43,7 @@ GetBarResource (
> return EFI_NOT_FOUND;
> }
>
> - BarIndex -= Dev->BarOffset;
> + BarIndex -= (UINT8)Dev->BarOffset;
>
> for (Desc = Dev->Device->Resources;
> Desc->Desc != ACPI_END_TAG_DESCRIPTOR; @@ -61,6 +61,7 @@ GetBarResource (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoPollMem (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -78,6 +79,7 @@ PciIoPollMem (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoPollIo (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -95,6 +97,7 @@ PciIoPollIo (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoMemRW (
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> IN UINTN Count,
> @@ -145,6 +148,7 @@ PciIoMemRW (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoMemRead (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -211,6 +215,7 @@ PciIoMemRead (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoMemWrite (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -277,6 +282,7 @@ PciIoMemWrite (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoIoRead (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -292,6 +298,7 @@ PciIoIoRead (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoIoWrite (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -307,6 +314,7 @@ PciIoIoWrite (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoPciRead (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -342,6 +350,7 @@ PciIoPciRead (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoPciWrite (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -369,6 +378,7 @@ PciIoPciWrite (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoCopyMem (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
> @@ -385,6 +395,7 @@ PciIoCopyMem (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> CoherentPciIoMap (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_OPERATION Operation,
> @@ -450,6 +461,7 @@ CoherentPciIoMap (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> CoherentPciIoUnmap (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN VOID *Mapping
> @@ -472,6 +484,7 @@ CoherentPciIoUnmap (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> CoherentPciIoAllocateBuffer (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_ALLOCATE_TYPE Type,
> @@ -513,6 +526,7 @@ CoherentPciIoAllocateBuffer (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> CoherentPciIoFreeBuffer (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN UINTN Pages,
> @@ -526,6 +540,7 @@ CoherentPciIoFreeBuffer (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoFlush (
> IN EFI_PCI_IO_PROTOCOL *This
> )
> @@ -535,6 +550,7 @@ PciIoFlush (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoGetLocation (
> IN EFI_PCI_IO_PROTOCOL *This,
> OUT UINTN *SegmentNumber,
> @@ -560,6 +576,7 @@ PciIoGetLocation (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoAttributes (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation, @@ -616,6 +633,7 @@ PciIoAttributes (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoGetBarAttributes (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN UINT8 BarIndex,
> @@ -666,6 +684,7 @@ PciIoGetBarAttributes (
>
> STATIC
> EFI_STATUS
> +EFIAPI
> PciIoSetBarAttributes (
> IN EFI_PCI_IO_PROTOCOL *This,
> IN UINT64 Attributes,
> --
> 2.7.4
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-09 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 8:17 [PATCH] MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers Ard Biesheuvel
2016-12-08 9:25 ` Bi, Dandan
2016-12-09 14:50 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox