* [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return
@ 2022-11-10 18:24 Michael D Kinney
2022-11-10 19:33 ` Chaganty, Rangasai V
2022-11-11 7:52 ` Ashraf Ali S
0 siblings, 2 replies; 3+ messages in thread
From: Michael D Kinney @ 2022-11-10 18:24 UTC (permalink / raw)
To: devel; +Cc: Ray Ni, Rangasai V Chaganty, Isaac Oram, Ashraf Ali S
CreateSecondLevelPagingEntryTable() has a return type of
VTD_SECOND_LEVEL_PAGING_ENTRY * and an error condition
returns a value of NULL.
Change return value of EFI_SUCCESS (value 0) to NULL to
address CLANG compiler detection of incorrect return type.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
.../IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
index 3220789080..6788c86531 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
@@ -196,7 +196,7 @@ CreateSecondLevelPagingEntryTable (
UINT64 EndAddress;
if (MemoryLimit == 0) {
- return EFI_SUCCESS;
+ return NULL;
}
Lvl4PagesStart = 0;
--
2.37.1.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return
2022-11-10 18:24 [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return Michael D Kinney
@ 2022-11-10 19:33 ` Chaganty, Rangasai V
2022-11-11 7:52 ` Ashraf Ali S
1 sibling, 0 replies; 3+ messages in thread
From: Chaganty, Rangasai V @ 2022-11-10 19:33 UTC (permalink / raw)
To: Kinney, Michael D, devel@edk2.groups.io
Cc: Ni, Ray, Oram, Isaac W, S, Ashraf Ali
Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>
-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Thursday, November 10, 2022 10:24 AM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; S, Ashraf Ali <ashraf.ali.s@intel.com>
Subject: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return
CreateSecondLevelPagingEntryTable() has a return type of VTD_SECOND_LEVEL_PAGING_ENTRY * and an error condition returns a value of NULL.
Change return value of EFI_SUCCESS (value 0) to NULL to address CLANG compiler detection of incorrect return type.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
.../IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
index 3220789080..6788c86531 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationT
+++ able.c
@@ -196,7 +196,7 @@ CreateSecondLevelPagingEntryTable (
UINT64 EndAddress;
if (MemoryLimit == 0) {
- return EFI_SUCCESS;
+ return NULL;
}
Lvl4PagesStart = 0;
--
2.37.1.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return
2022-11-10 18:24 [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return Michael D Kinney
2022-11-10 19:33 ` Chaganty, Rangasai V
@ 2022-11-11 7:52 ` Ashraf Ali S
1 sibling, 0 replies; 3+ messages in thread
From: Ashraf Ali S @ 2022-11-11 7:52 UTC (permalink / raw)
To: Kinney, Michael D, devel@edk2.groups.io
Cc: Ni, Ray, Chaganty, Rangasai V, Oram, Isaac W
Reviewed-by: S, Ashraf Ali <ashraf.ali.s@intel.com>
Regards,
Ashraf Ali S
Intel Technology India Pvt. Ltd.
-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Thursday, November 10, 2022 11:54 PM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; S, Ashraf Ali <ashraf.ali.s@intel.com>
Subject: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return
CreateSecondLevelPagingEntryTable() has a return type of VTD_SECOND_LEVEL_PAGING_ENTRY * and an error condition returns a value of NULL.
Change return value of EFI_SUCCESS (value 0) to NULL to address CLANG compiler detection of incorrect return type.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
.../IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
index 3220789080..6788c86531 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationT
+++ able.c
@@ -196,7 +196,7 @@ CreateSecondLevelPagingEntryTable (
UINT64 EndAddress;
if (MemoryLimit == 0) {
- return EFI_SUCCESS;
+ return NULL;
}
Lvl4PagesStart = 0;
--
2.37.1.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-11 7:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 18:24 [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return Michael D Kinney
2022-11-10 19:33 ` Chaganty, Rangasai V
2022-11-11 7:52 ` Ashraf Ali S
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox