public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdePkg/Ftp4: Fix wrong function pointer declaration
@ 2017-06-06  0:33 Alcantara, Paulo
  2017-08-02  8:20 ` Fu, Siyuan
  0 siblings, 1 reply; 2+ messages in thread
From: Alcantara, Paulo @ 2017-06-06  0:33 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Michael D Kinney, Liming Gao

EFI_FTP4_DATA_CALLBACK is a function pointer and defined as follows:

> typedef
> EFI_STATUS
> (EFIAPI *EFI_FTP4_DATA_CALLBACK)(
>  IN EFI_FTP4_PROTOCOL           *This,
>  IN EFI_FTP4_COMMAND_TOKEN      *Token
>  );

And EFI_FTP4_COMMAND_TOKEN structure declared it as:

> EFI_FTP4_DATA_CALLBACK *DataCallback

Which ended up being a pointer to function pointer and clearly wrong.
This patch fixes it by removing the misleading '*' from declaration.
It's also fixed in new UEFI 2.7 spec.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paulo Alcantara <paulo.alc.cavalcanti@hp.com>
---
 MdePkg/Include/Protocol/Ftp4.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Include/Protocol/Ftp4.h b/MdePkg/Include/Protocol/Ftp4.h
index 1c4a5db..536b3f3 100644
--- a/MdePkg/Include/Protocol/Ftp4.h
+++ b/MdePkg/Include/Protocol/Ftp4.h
@@ -204,7 +204,7 @@ struct _EFI_FTP4_COMMAND_TOKEN {
   /// DataBufferSize, again. If there is no data remained, 
   /// DataBufferSize should be set to 0.
   /// 
-  EFI_FTP4_DATA_CALLBACK                *DataCallback;
+  EFI_FTP4_DATA_CALLBACK                DataCallback;
   /// 
   /// Pointer to the parameter for DataCallback.
   /// 
-- 
2.9.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MdePkg/Ftp4: Fix wrong function pointer declaration
  2017-06-06  0:33 [PATCH] MdePkg/Ftp4: Fix wrong function pointer declaration Alcantara, Paulo
@ 2017-08-02  8:20 ` Fu, Siyuan
  0 siblings, 0 replies; 2+ messages in thread
From: Fu, Siyuan @ 2017-08-02  8:20 UTC (permalink / raw)
  To: Alcantara, Paulo, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Gao, Liming

Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>


-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Alcantara, Paulo
Sent: Tuesday, June 6, 2017 8:34 AM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2] [PATCH] MdePkg/Ftp4: Fix wrong function pointer declaration

EFI_FTP4_DATA_CALLBACK is a function pointer and defined as follows:

> typedef
> EFI_STATUS
> (EFIAPI *EFI_FTP4_DATA_CALLBACK)(
>  IN EFI_FTP4_PROTOCOL           *This,
>  IN EFI_FTP4_COMMAND_TOKEN      *Token
>  );

And EFI_FTP4_COMMAND_TOKEN structure declared it as:

> EFI_FTP4_DATA_CALLBACK *DataCallback

Which ended up being a pointer to function pointer and clearly wrong.
This patch fixes it by removing the misleading '*' from declaration.
It's also fixed in new UEFI 2.7 spec.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paulo Alcantara <paulo.alc.cavalcanti@hp.com>
---
 MdePkg/Include/Protocol/Ftp4.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Include/Protocol/Ftp4.h b/MdePkg/Include/Protocol/Ftp4.h
index 1c4a5db..536b3f3 100644
--- a/MdePkg/Include/Protocol/Ftp4.h
+++ b/MdePkg/Include/Protocol/Ftp4.h
@@ -204,7 +204,7 @@ struct _EFI_FTP4_COMMAND_TOKEN {
   /// DataBufferSize, again. If there is no data remained, 
   /// DataBufferSize should be set to 0.
   /// 
-  EFI_FTP4_DATA_CALLBACK                *DataCallback;
+  EFI_FTP4_DATA_CALLBACK                DataCallback;
   /// 
   /// Pointer to the parameter for DataCallback.
   /// 
-- 
2.9.4

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-02  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-06  0:33 [PATCH] MdePkg/Ftp4: Fix wrong function pointer declaration Alcantara, Paulo
2017-08-02  8:20 ` Fu, Siyuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox