public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Fu, Siyuan" <siyuan.fu@intel.com>
To: "Alcantara, Paulo" <paulo.alc.cavalcanti@hp.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [PATCH] MdePkg/Ftp4: Fix wrong function pointer declaration
Date: Wed, 2 Aug 2017 08:20:33 +0000	[thread overview]
Message-ID: <B1FF2E9001CE9041BD10B825821D5BC58B356851@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <AT5PR84MB0002DCC5E45B8AA1AD15A879ACCB0@AT5PR84MB0002.NAMPRD84.PROD.OUTLOOK.COM>

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


      reply	other threads:[~2017-08-02  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06  0:33 [PATCH] MdePkg/Ftp4: Fix wrong function pointer declaration Alcantara, Paulo
2017-08-02  8:20 ` Fu, Siyuan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B1FF2E9001CE9041BD10B825821D5BC58B356851@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox