[edk2-devel] [PATCH 07/35] MdeModulePkg: fix cast in GetModuleInfoFromHandle() calls

Laszlo Ersek posted 35 patches 6 years, 4 months ago
[edk2-devel] [PATCH 07/35] MdeModulePkg: fix cast in GetModuleInfoFromHandle() calls
Posted by Laszlo Ersek 6 years, 4 months ago
GetModuleInfoFromHandle() takes an EFI_HANDLE -- (VOID*) -- as first
parameter, but InsertFpdtRecord() passes (EFI_HANDLE*) -- (VOID**).
(VOID**) converts silently to (VOID*), which is why the wrong cast is
masked.

Note that the *value* that is passed is alright -- therefore this patch
does not change behavior --, it's just semantically wrong to pass an
(EFI_HANDLE*) where an EFI_HANDLE is expected.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
    lightly tested, as DxeCorePerformanceLib is linked into ArmVirtQemu's
    DxeCore

 MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c | 12 ++++++------
 MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
index 0d507c445210..f500e20b320b 100644
--- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
+++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
@@ -998,7 +998,7 @@ InsertFpdtRecord (
   switch (PerfId) {
   case MODULE_START_ID:
   case MODULE_END_ID:
-    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
     StringPtr = ModuleName;
     //
     // Cache the offset of start image start record and use to update the start image end record if needed.
@@ -1031,7 +1031,7 @@ InsertFpdtRecord (
 
   case MODULE_LOADIMAGE_START_ID:
   case MODULE_LOADIMAGE_END_ID:
-    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
     StringPtr = ModuleName;
     if (PerfId == MODULE_LOADIMAGE_START_ID) {
       mLoadImageCount ++;
@@ -1071,7 +1071,7 @@ InsertFpdtRecord (
   case MODULE_DB_SUPPORT_END_ID:
   case MODULE_DB_STOP_START_ID:
   case MODULE_DB_STOP_END_ID:
-    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
     StringPtr = ModuleName;
     if (!PcdGetBool (PcdEdkiiFpdtStringRecordEnableOnly)) {
       FpdtRecordPtr.GuidQwordEvent->Header.Type           = FPDT_GUID_QWORD_EVENT_TYPE;
@@ -1085,7 +1085,7 @@ InsertFpdtRecord (
     break;
 
   case MODULE_DB_END_ID:
-    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
     StringPtr = ModuleName;
     if (!PcdGetBool (PcdEdkiiFpdtStringRecordEnableOnly)) {
       FpdtRecordPtr.GuidQwordStringEvent->Header.Type     = FPDT_GUID_QWORD_STRING_EVENT_TYPE;
@@ -1131,7 +1131,7 @@ InsertFpdtRecord (
   case PERF_INMODULE_END_ID:
   case PERF_CROSSMODULE_START_ID:
   case PERF_CROSSMODULE_END_ID:
-    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
     if (String != NULL) {
       StringPtr = String;
     } else {
@@ -1153,7 +1153,7 @@ InsertFpdtRecord (
 
   default:
     if (Attribute != PerfEntry) {
-      GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+      GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
       if (String != NULL) {
         StringPtr = String;
       } else {
diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
index 5f07464c4ec7..b4f22c14ae73 100644
--- a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
+++ b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
@@ -587,7 +587,7 @@ InsertFpdtRecord (
   switch (PerfId) {
   case MODULE_START_ID:
   case MODULE_END_ID:
-    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
     StringPtr = ModuleName;
     //
     // Cache the offset of start image start record and use to update the start image end record if needed.
@@ -612,7 +612,7 @@ InsertFpdtRecord (
 
   case MODULE_LOADIMAGE_START_ID:
   case MODULE_LOADIMAGE_END_ID:
-    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
     StringPtr = ModuleName;
     if (PerfId == MODULE_LOADIMAGE_START_ID) {
       mLoadImageCount++;
@@ -669,7 +669,7 @@ InsertFpdtRecord (
   case PERF_INMODULE_END_ID:
   case PERF_CROSSMODULE_START_ID:
   case PERF_CROSSMODULE_END_ID:
-    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
     if (String != NULL) {
       StringPtr = String;
     } else {
@@ -691,7 +691,7 @@ InsertFpdtRecord (
 
   default:
     if (Attribute != PerfEntry) {
-      GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
+      GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
       if (String != NULL) {
         StringPtr = String;
       } else {
-- 
2.19.1.3.g30247aa5d201



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47394): https://edk2.groups.io/g/devel/message/47394
Mute This Topic: https://groups.io/mt/34180207/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 07/35] MdeModulePkg: fix cast in GetModuleInfoFromHandle() calls
Posted by Dandan Bi 6 years, 4 months ago
Reviewed-by: Dandan Bi <dandan.bi@intel.com>

Thanks,
Dandan

> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Wednesday, September 18, 2019 3:49 AM
> To: edk2-devel-groups-io <devel@edk2.groups.io>
> Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>;
> Wu, Hao A <hao.a.wu@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Gao, Liming <liming.gao@intel.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [PATCH 07/35] MdeModulePkg: fix cast in
> GetModuleInfoFromHandle() calls
> 
> GetModuleInfoFromHandle() takes an EFI_HANDLE -- (VOID*) -- as first
> parameter, but InsertFpdtRecord() passes (EFI_HANDLE*) -- (VOID**).
> (VOID**) converts silently to (VOID*), which is why the wrong cast is masked.
> 
> Note that the *value* that is passed is alright -- therefore this patch does not
> change behavior --, it's just semantically wrong to pass an
> (EFI_HANDLE*) where an EFI_HANDLE is expected.
> 
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>     lightly tested, as DxeCorePerformanceLib is linked into ArmVirtQemu's
>     DxeCore
> 
> 
> MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
> | 12 ++++++------
> MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLi
> b.c |  8 ++++----
>  2 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLi
> b.c
> b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLi
> b.c
> index 0d507c445210..f500e20b320b 100644
> ---
> a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLi
> b.c
> +++
> b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLi
> b.c
> @@ -998,7 +998,7 @@ InsertFpdtRecord (
>    switch (PerfId) {
>    case MODULE_START_ID:
>    case MODULE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName,
> + sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      //
>      // Cache the offset of start image start record and use to update the start
> image end record if needed.
> @@ -1031,7 +1031,7 @@ InsertFpdtRecord (
> 
>    case MODULE_LOADIMAGE_START_ID:
>    case MODULE_LOADIMAGE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName,
> + sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      if (PerfId == MODULE_LOADIMAGE_START_ID) {
>        mLoadImageCount ++;
> @@ -1071,7 +1071,7 @@ InsertFpdtRecord (
>    case MODULE_DB_SUPPORT_END_ID:
>    case MODULE_DB_STOP_START_ID:
>    case MODULE_DB_STOP_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName,
> + sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      if (!PcdGetBool (PcdEdkiiFpdtStringRecordEnableOnly)) {
>        FpdtRecordPtr.GuidQwordEvent->Header.Type           =
> FPDT_GUID_QWORD_EVENT_TYPE;
> @@ -1085,7 +1085,7 @@ InsertFpdtRecord (
>      break;
> 
>    case MODULE_DB_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName,
> + sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      if (!PcdGetBool (PcdEdkiiFpdtStringRecordEnableOnly)) {
>        FpdtRecordPtr.GuidQwordStringEvent->Header.Type     =
> FPDT_GUID_QWORD_STRING_EVENT_TYPE;
> @@ -1131,7 +1131,7 @@ InsertFpdtRecord (
>    case PERF_INMODULE_END_ID:
>    case PERF_CROSSMODULE_START_ID:
>    case PERF_CROSSMODULE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName,
> + sizeof (ModuleName), &ModuleGuid);
>      if (String != NULL) {
>        StringPtr = String;
>      } else {
> @@ -1153,7 +1153,7 @@ InsertFpdtRecord (
> 
>    default:
>      if (Attribute != PerfEntry) {
> -      GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +      GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier,
> + ModuleName, sizeof (ModuleName), &ModuleGuid);
>        if (String != NULL) {
>          StringPtr = String;
>        } else {
> diff --git
> a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformance
> Lib.c
> b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformance
> Lib.c
> index 5f07464c4ec7..b4f22c14ae73 100644
> ---
> a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformance
> Lib.c
> +++
> b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformance
> Lib.c
> @@ -587,7 +587,7 @@ InsertFpdtRecord (
>    switch (PerfId) {
>    case MODULE_START_ID:
>    case MODULE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName,
> + sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      //
>      // Cache the offset of start image start record and use to update the start
> image end record if needed.
> @@ -612,7 +612,7 @@ InsertFpdtRecord (
> 
>    case MODULE_LOADIMAGE_START_ID:
>    case MODULE_LOADIMAGE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName,
> + sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      if (PerfId == MODULE_LOADIMAGE_START_ID) {
>        mLoadImageCount++;
> @@ -669,7 +669,7 @@ InsertFpdtRecord (
>    case PERF_INMODULE_END_ID:
>    case PERF_CROSSMODULE_START_ID:
>    case PERF_CROSSMODULE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName,
> + sizeof (ModuleName), &ModuleGuid);
>      if (String != NULL) {
>        StringPtr = String;
>      } else {
> @@ -691,7 +691,7 @@ InsertFpdtRecord (
> 
>    default:
>      if (Attribute != PerfEntry) {
> -      GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier,
> ModuleName, sizeof (ModuleName), &ModuleGuid);
> +      GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier,
> + ModuleName, sizeof (ModuleName), &ModuleGuid);
>        if (String != NULL) {
>          StringPtr = String;
>        } else {
> --
> 2.19.1.3.g30247aa5d201
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47517): https://edk2.groups.io/g/devel/message/47517
Mute This Topic: https://groups.io/mt/34180207/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 07/35] MdeModulePkg: fix cast in GetModuleInfoFromHandle() calls
Posted by Philippe Mathieu-Daudé 6 years, 4 months ago
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> GetModuleInfoFromHandle() takes an EFI_HANDLE -- (VOID*) -- as first
> parameter, but InsertFpdtRecord() passes (EFI_HANDLE*) -- (VOID**).
> (VOID**) converts silently to (VOID*), which is why the wrong cast is
> masked.
> 
> Note that the *value* that is passed is alright -- therefore this patch
> does not change behavior --, it's just semantically wrong to pass an
> (EFI_HANDLE*) where an EFI_HANDLE is expected.
> 
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>     lightly tested, as DxeCorePerformanceLib is linked into ArmVirtQemu's
>     DxeCore
> 
>  MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c | 12 ++++++------
>  MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c |  8 ++++----
>  2 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
> index 0d507c445210..f500e20b320b 100644
> --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
> +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
> @@ -998,7 +998,7 @@ InsertFpdtRecord (
>    switch (PerfId) {
>    case MODULE_START_ID:
>    case MODULE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      //
>      // Cache the offset of start image start record and use to update the start image end record if needed.
> @@ -1031,7 +1031,7 @@ InsertFpdtRecord (
>  
>    case MODULE_LOADIMAGE_START_ID:
>    case MODULE_LOADIMAGE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      if (PerfId == MODULE_LOADIMAGE_START_ID) {
>        mLoadImageCount ++;
> @@ -1071,7 +1071,7 @@ InsertFpdtRecord (
>    case MODULE_DB_SUPPORT_END_ID:
>    case MODULE_DB_STOP_START_ID:
>    case MODULE_DB_STOP_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      if (!PcdGetBool (PcdEdkiiFpdtStringRecordEnableOnly)) {
>        FpdtRecordPtr.GuidQwordEvent->Header.Type           = FPDT_GUID_QWORD_EVENT_TYPE;
> @@ -1085,7 +1085,7 @@ InsertFpdtRecord (
>      break;
>  
>    case MODULE_DB_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      if (!PcdGetBool (PcdEdkiiFpdtStringRecordEnableOnly)) {
>        FpdtRecordPtr.GuidQwordStringEvent->Header.Type     = FPDT_GUID_QWORD_STRING_EVENT_TYPE;
> @@ -1131,7 +1131,7 @@ InsertFpdtRecord (
>    case PERF_INMODULE_END_ID:
>    case PERF_CROSSMODULE_START_ID:
>    case PERF_CROSSMODULE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>      if (String != NULL) {
>        StringPtr = String;
>      } else {
> @@ -1153,7 +1153,7 @@ InsertFpdtRecord (
>  
>    default:
>      if (Attribute != PerfEntry) {
> -      GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +      GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>        if (String != NULL) {
>          StringPtr = String;
>        } else {
> diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
> index 5f07464c4ec7..b4f22c14ae73 100644
> --- a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
> +++ b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
> @@ -587,7 +587,7 @@ InsertFpdtRecord (
>    switch (PerfId) {
>    case MODULE_START_ID:
>    case MODULE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      //
>      // Cache the offset of start image start record and use to update the start image end record if needed.
> @@ -612,7 +612,7 @@ InsertFpdtRecord (
>  
>    case MODULE_LOADIMAGE_START_ID:
>    case MODULE_LOADIMAGE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>      StringPtr = ModuleName;
>      if (PerfId == MODULE_LOADIMAGE_START_ID) {
>        mLoadImageCount++;
> @@ -669,7 +669,7 @@ InsertFpdtRecord (
>    case PERF_INMODULE_END_ID:
>    case PERF_CROSSMODULE_START_ID:
>    case PERF_CROSSMODULE_END_ID:
> -    GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +    GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>      if (String != NULL) {
>        StringPtr = String;
>      } else {
> @@ -691,7 +691,7 @@ InsertFpdtRecord (
>  
>    default:
>      if (Attribute != PerfEntry) {
> -      GetModuleInfoFromHandle ((EFI_HANDLE *)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
> +      GetModuleInfoFromHandle ((EFI_HANDLE)CallerIdentifier, ModuleName, sizeof (ModuleName), &ModuleGuid);
>        if (String != NULL) {
>          StringPtr = String;
>        } else {
> 

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

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47917): https://edk2.groups.io/g/devel/message/47917
Mute This Topic: https://groups.io/mt/34180207/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-