From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.215.1668108795666970709 for ; Thu, 10 Nov 2022 11:33:16 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=KGd1XCBw; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: rangasai.v.chaganty@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668108795; x=1699644795; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nnPsBa/3jkSWNck1IIke5uFYx51NYY89pr+BVDc+42A=; b=KGd1XCBwLEbR/xUsrLP6OnAzXqCJOun/NExfeyH1hYudWJsg+X54BuWg 43aDWv7Dv+Eo+9j9nwFCBaGhYD5LE+OCA6RR8wFot2eEOm5sMD04OtdHR 7f2GMh+VNXqbLWFM339eFUu+9t+4nWhnFx6aMGYC5t1+hZg7UweLWjzRb yyeFC4HP3u5b6ZLuWMygMqVtsRUN0pz5MbiEoktKpkTtFSHKEiUJ4n1C4 vQneqrDzlkiPhpeAsJOX6qihMdO7zwSHheYfipSaLp/uTl94MFpmuhtkB wvsLBh/m2wFlbBQPVGlpJwzOYOdR1XSC8QNCLYPhgo6q9cjrmX+ZHBETJ Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="291145381" X-IronPort-AV: E=Sophos;i="5.96,154,1665471600"; d="scan'208";a="291145381" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2022 11:33:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="588302780" X-IronPort-AV: E=Sophos;i="5.96,154,1665471600"; d="scan'208";a="588302780" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP; 10 Nov 2022 11:33:14 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 10 Nov 2022 11:33:14 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 10 Nov 2022 11:33:14 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 10 Nov 2022 11:33:14 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 10 Nov 2022 11:33:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gWhgkpOYHc1V/YNd4vfmEyqCi9TJnZZZltyWajOQttcg8Rc4uMAl7g8j6ABjKdofIZCqB20I9FZPUZGZEucyHfK0Dqzvdb44/MzqLQURgXiipfrXsThHxFiJA+FLrbkUUwyD81mPBoVn/haziRk+4TXp5HZFQsfInUtseI5xTzuUeruA+gVJbQ4cM65u9kVbnHSZaDzO2gEg+zZk2M6wnxrCnLkG7XTVqYQ5gqBnRwsHo1u+eYL3NexLhXk6gBcnu54mbgpIPuykj/syIJ5VqJjZOnsqDZUMR4Xb5gRTXZLX2x+ak41ISFcosYzd1OgVdVjAGYGiFKRsR00DNZXEQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JS//Z5iH8LQWrzGz/8cPJEwvGaQV0W1LTd/urwbx1DQ=; b=Sv3Yvh4yBgCfHYcF562XUkbYc4frNL6jE1A6lWj40WD7HSOOvaah1bRgiW+RjyZjYFsmD9JI+/2ZnhvOUul4Jz9Ha0LKBOZO8fZjDjJlGZ+2ZZq1a6U/ZmHe6ePC7RIAwiKVTFK3sRVlnwjcAgj+pyOEnUDdncHoWLBn4czGZTDg70YXMtsmOyNfLbqikU1eICmyghk0pqCNQV45vrykY33KMPaDfI1NtEmsv4p/lVwkaMYQcb1zE2DT1YKOaiSsTjjvBp19jcKHzWsfSZ6+12mcUhXPAu490a10s3rHbtEWL81CPDKq4AEQ6PLjh0sJ91VOrenxdZxP346B0G14sg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5776.namprd11.prod.outlook.com (2603:10b6:303:183::9) by CO1PR11MB4804.namprd11.prod.outlook.com (2603:10b6:303:6f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Thu, 10 Nov 2022 19:33:12 +0000 Received: from MW4PR11MB5776.namprd11.prod.outlook.com ([fe80::cfab:5e4e:581:39cf]) by MW4PR11MB5776.namprd11.prod.outlook.com ([fe80::cfab:5e4e:581:39cf%7]) with mapi id 15.20.5791.022; Thu, 10 Nov 2022 19:33:11 +0000 From: "Chaganty, Rangasai V" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Oram, Isaac W" , "S, Ashraf Ali" Subject: Re: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return Thread-Topic: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG detected incorrect return Thread-Index: AQHY9TGzAEq4p5sRAkyCAufQI+Vwt644jBaQ Date: Thu, 10 Nov 2022 19:33:11 +0000 Message-ID: References: <20221110182421.130-1-michael.d.kinney@intel.com> In-Reply-To: <20221110182421.130-1-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5776:EE_|CO1PR11MB4804:EE_ x-ms-office365-filtering-correlation-id: d2eab192-a7b6-4d47-8018-08dac3526795 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IDFZlYhXnrucTqRZ4VxlS3OBf9FYArXikknfRehHR2YvN39InCCTH1rSP/K4CZzo7rmQ1rXax7cjsAfsqxx3FVTY/9Ufj9GZZ6OliJTPXVvzYCaz5og+pm7wkIT+JNL+aOuQcFe0V9dJ15vYE+6ySJDBG5SXUd3BxPDxHaiSJ8dx5Yi3H3uIV9vr8vXNR/pwaWpGTrjTJGprrblzJFtei8NbbH5rvKYByh516GZRpshjoHf9MsVtxcGkefCzWV4bndstNC3ZRQB3VUq5o6F5r2dzklCkIqWFIcQmv0Gd154lAyxMGB161ka32gsmgZwIH+azQ0hedc+/1WaM29ayAuOKlaSRFgPX/6PGjS3pCAXRszUW5Bi09yWaKGlEa6pnrlqSTu0t7PRpMRpskG7CkrXNwxAyra2K+WwuXqceD00ryTJBLbdZL+7Z3A0JojLqLH2JRwUtvHJbe0SstnwdKfQ3NFRhM7Gf+mDd5YRF8ncDL9Ml2aNgewGq8t9GaTvIr4mBbj+4Gb1jNpHuHKllDt5XpeqVZH13GiRqH6UKWVQOdDkmBGaXNoIedXKKyELV9uOUQCDk/+knPPq+TmA60QbHLYVIAz+9aQ/QX0NqqQD+g05+PTLTwt9VGVJNxco3ZU4q0rd4xFmvqdd9rJrOGULH01zWxWl5Q0gE/XyogNbFFeD44exMr+fBgFVKNK/du6r21Jnr8OdOK6mevXhzBexQnx2iO8Hr9SEqU9NCuYCCrDuZOh737OY633QbrzSswuwtP/FtGI1i4Q4IzQBadA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5776.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(6029001)(39860400002)(396003)(366004)(376002)(136003)(346002)(451199015)(33656002)(86362001)(82960400001)(38070700005)(38100700002)(55016003)(26005)(2906002)(6506007)(53546011)(7696005)(186003)(83380400001)(122000001)(107886003)(9686003)(66556008)(64756008)(76116006)(316002)(71200400001)(66446008)(54906003)(66476007)(66946007)(110136005)(8676002)(52536014)(4326008)(8936002)(478600001)(41300700001)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GRwx7xVZGE0TZxR9d7UcpAgdXP3t1qOWvUs1KW9V1fV1pKl3NNjhhbSaQRgZ?= =?us-ascii?Q?EnLwbCVVfAu/c8tGRqLLec1oPsoQUkmPyjruqoaKkeE8LMzX5lcitVHWdT2q?= =?us-ascii?Q?hN6ztES+XQIUOohf1wKmqFys7MisivW1kK1eKdf5Fqq3522xD0S6tFlQffQe?= =?us-ascii?Q?fK+PpTq4znWiIh7OUxEf1UDMMCKOjet36z8p1Hf/zmRTz9byWL+PJ2vP1SI8?= =?us-ascii?Q?UCRdOsnLp2shsLjdb+AGJe1VcF9HCCM0fC2dn73Ew90pbVD5mZSO0VXqzCbo?= =?us-ascii?Q?L0Gtm+Yl/qEaAsrUMNZFUc92hJn/xoYZedMWeqwSGNewLidjsCjHw7avJpg6?=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nXoL55iF/DsAPosiaOD1/Tv/iKMD?= =?us-ascii?Q?otHx5x0lOoSVYqHQ0Z+snUjhZ9J4ceWKqLk0Kyo7P4A5dT/H7UV6ctEsXYP2?= =?us-ascii?Q?6z1+JkJjkwNq1drIlQyv03FxlOZgk4IBBbCQwFYD/gDzq2RKt4oNiDa02cDU?= =?us-ascii?Q?jtV+KvDY7EMhJrthDRNz++OK/yRPSMADEMFfl3VVlmOUOCirz8Nl2FxUdAVo?= =?us-ascii?Q?cU+I2Yl9ufFAA5Q7OK9WHJI7UeA5LWHHtjxUZGtJgjMFjymmcK3xq2lfDLI4?= =?us-ascii?Q?H+1FLuDhProWGSMaCYIuFAMubGKG2B2kK8baOPnWT2ULkKe70OFMGVhD+zoz?= =?us-ascii?Q?/4w3gH4cPZpCYpKCv/X71I8HRP9OjAsIh5B2UCOHedC5iZbjmKuOtEsvv9b8?= =?us-ascii?Q?fQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5776.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2eab192-a7b6-4d47-8018-08dac3526795 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2022 19:33:11.8463 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1GvyADGVyvbs/9mjMSq0bynRxIMBsTZ+wDi7GqZy1H6N9rb/Rfnv+cwgdj7zj5CQtjzXpM81j4+xADLWCG0TFdNKZIQrucgaqOxoILfB1f0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4804 Return-Path: rangasai.v.chaganty@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Sai Chaganty -----Original Message----- From: Kinney, Michael D =20 Sent: Thursday, November 10, 2022 10:24 AM To: devel@edk2.groups.io Cc: Ni, Ray ; Chaganty, Rangasai V ; Oram, Isaac W ; S, Ashraf Ali Subject: [Patch edk2-platforms] IntelSiliconPkg/IntelVTdDxe: Fix CLANG dete= cted incorrect return CreateSecondLevelPagingEntryTable() has a return type of VTD_SECOND_LEVEL_P= AGING_ENTRY * and an error condition returns a value of NULL. Change return value of EFI_SUCCESS (value 0) to NULL to address CLANG compi= ler 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/Translat= ionTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Translat= ionTable.c index 3220789080..6788c86531 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTabl= e.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationT +++ able.c @@ -196,7 +196,7 @@ CreateSecondLevelPagingEntryTable ( UINT64 EndAddress; =20 if (MemoryLimit =3D=3D 0) { - return EFI_SUCCESS; + return NULL; } =20 Lvl4PagesStart =3D 0; -- 2.37.1.windows.1