Reviewed-by: S, Ashraf Ali <[email protected]>

Regards,
Ashraf Ali S
Intel Technology India Pvt. Ltd. 

-----Original Message-----
From: Kinney, Michael D <[email protected]> 
Sent: Thursday, November 10, 2022 11:54 PM
To: [email protected]
Cc: Ni, Ray <[email protected]>; Chaganty, Rangasai V 
<[email protected]>; Oram, Isaac W <[email protected]>; S, 
Ashraf Ali <[email protected]>
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 <[email protected]>
Cc: Rangasai V Chaganty <[email protected]>
Cc: Isaac Oram <[email protected]>
Cc: Ashraf Ali S <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
---
 .../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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96252): https://edk2.groups.io/g/devel/message/96252
Mute This Topic: https://groups.io/mt/94942403/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to