[edk2-devel] [Resend PATCH v5 3/4] DynamicTablesPkg: Corrects function pointer typedef of AML_PARSE_FUNCTION

Abdul Lateef Attar via groups.io posted 4 patches 2 years, 1 month ago
[edk2-devel] [Resend PATCH v5 3/4] DynamicTablesPkg: Corrects function pointer typedef of AML_PARSE_FUNCTION
Posted by Abdul Lateef Attar via groups.io 2 years, 1 month ago
From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>

Corrects the function pointer typedef AML_PARSE_FUNCTION,
otherwise some compiler like VS2019 gives error.

Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
---
 DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c b/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c
index 8e584d4930..d3a51a94c7 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c
@@ -100,8 +100,7 @@ AmlParseStream (
 **/
 typedef
 EFI_STATUS
-EFIAPI
-(*AML_PARSE_FUNCTION) (
+(EFIAPI *AML_PARSE_FUNCTION)(
   IN      CONST AML_NODE_HEADER   *Node,
   IN            AML_PARSE_FORMAT  ExpectedFormat,
   IN  OUT       AML_STREAM        *FStream,
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112756): https://edk2.groups.io/g/devel/message/112756
Mute This Topic: https://groups.io/mt/103278520/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Resend PATCH v5 3/4] DynamicTablesPkg: Corrects function pointer typedef of AML_PARSE_FUNCTION
Posted by Sami Mujawar 2 years, 1 month ago
Hi Abdul,

Thank you for this fix.

For Arm EFIAPI evaluates to nothing, hence we could not catch such issues.

Do you use the rest of the Dynamic Tables Framework? I guess we have not 
included the calling convention at other places e.g. 
https://github.com/tianocore/edk2/blob/master/DynamicTablesPkg/Include/AcpiTableGenerator.h#L217

Maybe we need to find and fix those issues as well.

In either case, this patch looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 20/12/2023 09:38 am, Abdul Lateef Attar wrote:
> From: Abdul Lateef Attar<AbdulLateef.Attar@amd.com>
>
> Corrects the function pointer typedef AML_PARSE_FUNCTION,
> otherwise some compiler like VS2019 gives error.
>
> Cc: Pierre Gondois<pierre.gondois@arm.com>
> Cc: Sami Mujawar<sami.mujawar@arm.com>
> Signed-off-by: Abdul Lateef Attar<AbdulLateef.Attar@amd.com>
> Reviewed-by: Pierre Gondois<pierre.gondois@arm.com>
> ---
>   DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c b/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c
> index 8e584d4930..d3a51a94c7 100644
> --- a/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c
> +++ b/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c
> @@ -100,8 +100,7 @@ AmlParseStream (
>   **/
>   typedef
>   EFI_STATUS
> -EFIAPI
> -(*AML_PARSE_FUNCTION) (
> +(EFIAPI *AML_PARSE_FUNCTION)(
>     IN      CONST AML_NODE_HEADER   *Node,
>     IN            AML_PARSE_FORMAT  ExpectedFormat,
>     IN  OUT       AML_STREAM        *FStream,


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112816): https://edk2.groups.io/g/devel/message/112816
Mute This Topic: https://groups.io/mt/103278520/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [Resend PATCH v5 3/4] DynamicTablesPkg: Corrects function pointer typedef of AML_PARSE_FUNCTION
Posted by Abdul Lateef Attar via groups.io 2 years, 1 month ago
[AMD Official Use Only - General]

Hi Sami,
                Currently we are using the AML library and evaluating the Dynamic Tables Framework.
Soon we will be publishing(upstreaming) the usage of AML library under the edk2-platforms/Platform/AMD/AmdPlatformPkg.

Thanks
AbduL

From: Sami Mujawar <sami.mujawar@arm.com>
Sent: Thursday, December 21, 2023 7:24 PM
To: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; devel@edk2.groups.io
Cc: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Pierre Gondois <pierre.gondois@arm.com>; nd@arm.com
Subject: Re: [Resend PATCH v5 3/4] DynamicTablesPkg: Corrects function pointer typedef of AML_PARSE_FUNCTION

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Hi Abdul,

Thank you for this fix.

For Arm EFIAPI evaluates to nothing, hence we could not catch such issues.

Do you use the rest of the Dynamic Tables Framework? I guess we have not included the calling convention at other places e.g. https://github.com/tianocore/edk2/blob/master/DynamicTablesPkg/Include/AcpiTableGenerator.h#L217

Maybe we need to find and fix those issues as well.

In either case, this patch looks good to me.

Reviewed-by: Sami Mujawar

<sami.mujawar@arm.com><mailto:sami.mujawar@arm.com>

Regards,

Sami Mujawar


On 20/12/2023 09:38 am, Abdul Lateef Attar wrote:

From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com><mailto:AbdulLateef.Attar@amd.com>



Corrects the function pointer typedef AML_PARSE_FUNCTION,

otherwise some compiler like VS2019 gives error.



Cc: Pierre Gondois <pierre.gondois@arm.com><mailto:pierre.gondois@arm.com>

Cc: Sami Mujawar <sami.mujawar@arm.com><mailto:sami.mujawar@arm.com>

Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com><mailto:AbdulLateef.Attar@amd.com>

Reviewed-by: Pierre Gondois <pierre.gondois@arm.com><mailto:pierre.gondois@arm.com>

---

 DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c | 3 +--

 1 file changed, 1 insertion(+), 2 deletions(-)



diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c b/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c

index 8e584d4930..d3a51a94c7 100644

--- a/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c

+++ b/DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlParser.c

@@ -100,8 +100,7 @@ AmlParseStream (

 **/

 typedef

 EFI_STATUS

-EFIAPI

-(*AML_PARSE_FUNCTION) (

+(EFIAPI *AML_PARSE_FUNCTION)(

   IN      CONST AML_NODE_HEADER   *Node,

   IN            AML_PARSE_FORMAT  ExpectedFormat,

   IN  OUT       AML_STREAM        *FStream,


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112835): https://edk2.groups.io/g/devel/message/112835
Mute This Topic: https://groups.io/mt/103278520/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-