diff mbox series

[edk2,edk2-staging,12/19] IntelUndiPkg/GigUndiDxe: cast E1000MemCopy () args to correct pointer type

Message ID 20181106175833.26964-13-ard.biesheuvel@linaro.org
State New
Headers show
Series IntelUndiPkg/GigUndiDxe: build fixes for AARCH64/ARM/GCC | expand

Commit Message

Ard Biesheuvel Nov. 6, 2018, 5:58 p.m. UTC
E1000MemCopy () takes UINT8 pointers not INT8 pointers, so cast the
arguments to the correct type.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 IntelUndiPkg/GigUndiDxe/e1000.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.19.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Philippe Mathieu-Daudé Nov. 6, 2018, 8:35 p.m. UTC | #1
On 6/11/18 18:58, Ard Biesheuvel wrote:
> E1000MemCopy () takes UINT8 pointers not INT8 pointers, so cast the
> arguments to the correct type.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   IntelUndiPkg/GigUndiDxe/e1000.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/IntelUndiPkg/GigUndiDxe/e1000.c b/IntelUndiPkg/GigUndiDxe/e1000.c
> index 1f08a5d67b2d..4c9a06b8cf73 100644
> --- a/IntelUndiPkg/GigUndiDxe/e1000.c
> +++ b/IntelUndiPkg/GigUndiDxe/e1000.c
> @@ -674,8 +674,8 @@ E1000Receive (
>   
>         // Copy the packet from our list to the EFI buffer.
>         E1000MemCopy (
> -        (INT8 *) (UINTN) CpbReceive->BufferAddr,
> -        (INT8 *) (UINTN) ReceiveDescriptor->buffer_addr,
> +        (UINT8 *) (UINTN) CpbReceive->BufferAddr,
> +        (UINT8 *) (UINTN) ReceiveDescriptor->buffer_addr,
>           TempLen
>         );
>   
>
Ryszard Knop Jan. 30, 2019, 1:37 p.m. UTC | #2
Reviewed-by: Ryszard Knop <ryszard.knop@linux.intel.com>


On Tue, 2018-11-06 at 18:58 +0100, ard.biesheuvela wrote:
> E1000MemCopy () takes UINT8 pointers not INT8 pointers, so cast the

> arguments to the correct type.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>

> ---

>  IntelUndiPkg/GigUndiDxe/e1000.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/IntelUndiPkg/GigUndiDxe/e1000.c

> b/IntelUndiPkg/GigUndiDxe/e1000.c

> index 1f08a5d67b2d..4c9a06b8cf73 100644

> --- a/IntelUndiPkg/GigUndiDxe/e1000.c

> +++ b/IntelUndiPkg/GigUndiDxe/e1000.c

> @@ -674,8 +674,8 @@ E1000Receive (

>  

>        // Copy the packet from our list to the EFI buffer.

>        E1000MemCopy (

> -        (INT8 *) (UINTN) CpbReceive->BufferAddr,

> -        (INT8 *) (UINTN) ReceiveDescriptor->buffer_addr,

> +        (UINT8 *) (UINTN) CpbReceive->BufferAddr,

> +        (UINT8 *) (UINTN) ReceiveDescriptor->buffer_addr,

>          TempLen

>        );

>  


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/IntelUndiPkg/GigUndiDxe/e1000.c b/IntelUndiPkg/GigUndiDxe/e1000.c
index 1f08a5d67b2d..4c9a06b8cf73 100644
--- a/IntelUndiPkg/GigUndiDxe/e1000.c
+++ b/IntelUndiPkg/GigUndiDxe/e1000.c
@@ -674,8 +674,8 @@  E1000Receive (
 
       // Copy the packet from our list to the EFI buffer.
       E1000MemCopy (
-        (INT8 *) (UINTN) CpbReceive->BufferAddr,
-        (INT8 *) (UINTN) ReceiveDescriptor->buffer_addr,
+        (UINT8 *) (UINTN) CpbReceive->BufferAddr,
+        (UINT8 *) (UINTN) ReceiveDescriptor->buffer_addr,
         TempLen
       );