From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web08.4354.1668587065770801430 for ; Wed, 16 Nov 2022 00:24:26 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Jb6oj9sI; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: michael.d.kinney@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668587065; x=1700123065; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=+iKyDtdNvFGUua04IQe1DbbmaeDXPbhvc4TJDYfuW8s=; b=Jb6oj9sIA2jhDKs6SagPbBybYqX+D/L+JNsZNTsZC4YsxuIo3phYj71m yRoNv7QtE+Z9AW7yxEMZzlN0clv2L2zOOLy2MZ/8Py6BG0BiyRvnwajKu 9uTUhhEo7tv74bwqzhx4E45zPOUI90PS/yYlOXlU97459RI4LVxi6q4AI yKzjqS2q0CsqfvRdSceXSJctMBEI0CzF8buOBW62yNOVHWC9xmtb8EHf6 vXALaGUCFdSp67WdK9PGg1G21hjzkB8nYA3qMt6QOxCS+ZgKepDldPfgC Emk0BPcjI0Qj9dKAAeUc4V71d5P5v9uqbqKiOB8Dq6YslpVsox7Df9DDL g==; X-IronPort-AV: E=McAfee;i="6500,9779,10532"; a="313635031" X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="313635031" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 00:24:25 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10532"; a="670412148" X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="670412148" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.255.229.111]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 00:24:25 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Isaac Oram , Ashraf Ali S Subject: [Patch] IntelSiliconPkg/IntelVTdDmarPei: Fix CLANG detected incorrect return Date: Wed, 16 Nov 2022 00:24:17 -0800 Message-Id: <20221116082418.259-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.37.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Rangasai V Chaganty Cc: Isaac Oram Cc: Ashraf Ali S Signed-off-by: Michael D Kinney --- .../Feature/VTd/IntelVTdDmarPei/TranslationTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c index a806c4c000..bb121a608e 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c @@ -109,7 +109,7 @@ CreateSecondLevelPagingEntryTable ( BOOLEAN Is5LevelPaging; if (MemoryLimit == 0) { - return EFI_SUCCESS; + return NULL; } Lvl4PagesStart = 0; -- 2.37.1.windows.1