From: "Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Ni, Ray" <ray.ni@intel.com>,
"Oram, Isaac W" <isaac.w.oram@intel.com>,
"S, Ashraf Ali" <ashraf.ali.s@intel.com>
Subject: Re: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return
Date: Thu, 10 Nov 2022 19:33:11 +0000 [thread overview]
Message-ID: <MW4PR11MB57763E84FC2549C15659A42AB6019@MW4PR11MB5776.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221110182421.130-1-michael.d.kinney@intel.com>
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
next prev parent reply other threads:[~2022-11-10 19:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2022-11-11 7:52 ` Ashraf Ali S
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=MW4PR11MB57763E84FC2549C15659A42AB6019@MW4PR11MB5776.namprd11.prod.outlook.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