From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.144.1668104669851061615 for ; Thu, 10 Nov 2022 10:24:30 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=mNNPXW3a; spf=pass (domain: intel.com, ip: 192.55.52.88, 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=1668104669; x=1699640669; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fQhhVLOJozqafzml5OqjvTv5gCQVGebqt4Mn4OhvTdU=; b=mNNPXW3ac79OB0hdX2fZJILe84V3R5T6duy8kF9frPwtknO3VmFRiI7n 4p4+4bZ+k7nxNEQjggi+bfjRfJKc6vBRZ+KrrrREPCVpuSICdFGuqDw8W HxISNyTa1Y1UwbsEJBiyK9xZ2ujDT9yxQCGmTGGHcSppeB6SBY/El+96i mpsIbJxQalf34ucN/iImHHG87T5NsqdSvlpu8SwSoOaI6FhQECJZ2vC9/ ve1jIjG8Xja+05jAbWQdnGpWExQneZT6kTEtQPjXRG4pYOGVod0E5UBDf N/N1+BcZ4cMVlouJMw7i8OjOlcxBHoy5TgfqLh+w1scx/Z4rNC5UAfsB5 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="338156140" X-IronPort-AV: E=Sophos;i="5.96,154,1665471600"; d="scan'208";a="338156140" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2022 10:24:28 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="762383331" X-IronPort-AV: E=Sophos;i="5.96,154,1665471600"; d="scan'208";a="762383331" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.209.15.181]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2022 10:24:27 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Isaac Oram , Ashraf Ali S Subject: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return Date: Thu, 10 Nov 2022 10:24:21 -0800 Message-Id: <20221110182421.130-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 --- .../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