From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web09.3064.1668153151379186758 for ; Thu, 10 Nov 2022 23:52:31 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=gSMhxjIq; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: ashraf.ali.s@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668153151; x=1699689151; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5dg0/tXAl9POL/sHLMlG8Ane+VYjXaRGslEvd45Gk2w=; b=gSMhxjIqLKoIepozmmQNp3c9c9D50StVx8YxXkGXjyXd+cQInVMIeJZv ROaeKdnqCy2zPaUyEisUMpryMYN06Oj3waG9peihNZ3Ni1OmbJ9+p+n/7 R5uuQAXo1RfPXfwogt/cjo+Bpwguo2URSbczK1+RLF+9UTrd2hi/O5N5A sW/XWHK8rW+krcHavJ07u9gC7n4uSF/AD7bDkZa/WBYwSZH9Vdwz8sHaJ oB2C1aPVwSNTdlPfOMBV28lwMBmZp8DS/K7gUEGQQeHaTKDtX9NOigY09 +WTl90GH9bN8cnwF6Ae4I18YPL28JcVXtwvvsgdazO/a+Cmjs3xlNNYRl Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="373680036" X-IronPort-AV: E=Sophos;i="5.96,156,1665471600"; d="scan'208";a="373680036" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2022 23:52:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="726704359" X-IronPort-AV: E=Sophos;i="5.96,156,1665471600"; d="scan'208";a="726704359" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 10 Nov 2022 23:52:30 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) 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 23:52:30 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) 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 23:52:29 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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 23:52:29 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (134.134.137.102) 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 23:52:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JVbmUHd3BjZVo0oqpygkBEiU3Q46dX7S1iHWmg1jQn/50MUgY/ElNHZQ5n1IGxI6OqZATGhUcMUl6kiJEDyAiI1/jB/UGo5if4GSyIhwEcxXo9gssS8IpHvcLrsrzJrEaxXH0RDpj0clD7HSS12TMQROnYDSQtV/9yCOfwm0PeLwvDC4w1JisRxk4I2o/kcsGRvXw19AmnUKF2h5cfmWljsZEuyIZvZ5Rb3isrCgRvFbM4T5fNixVZpAZSy5w1BPCspHLLVFEmrU2I2mgLMR3Z9txB4VsTh/xUqlXekypK4rWnltuCrT5oBDp4UruxW4ahqU4gi6T2MHTLN5Qo18dQ== 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=IzW+vgS/kCxphfgKqUZAI6IQhHXfSM+q0W95j6t9XSc=; b=OQ+eS/siLeXCvfvg2Yyzie1+RTKiesduWz8NxlJTDXrpFIQIj2dd4I+d97Ftf8byu2J17VWeFkkuVXtiP2p21Yw3i3/7oUz5R6UIkGFiuUnh1Pu85R80NbH0D/4VXS5LBXqZ/aSeZS0PuwTlI9fXZRcdJYziRzr5osDvfi0FTRdq+r5tTcBfniUjAo3ISHbUuNWl46QM+6JmPd7d0GpypUxRZgI25X0Z3I9BFO0fR0W0iTKTTXa0XdA8u/cA1GgopKOD55QglJh1SQKvPyMA2qpQt15d1+itajezsPH0dBkAQoOwuOhGuLtkMJwMU1zZWM8dA1oHrSYJfiMo7I4xdQ== 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 DM4PR11MB5280.namprd11.prod.outlook.com (2603:10b6:5:38b::18) by CY5PR11MB6090.namprd11.prod.outlook.com (2603:10b6:930:2e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.26; Fri, 11 Nov 2022 07:52:28 +0000 Received: from DM4PR11MB5280.namprd11.prod.outlook.com ([fe80::2fc5:ebb9:bf89:5b23]) by DM4PR11MB5280.namprd11.prod.outlook.com ([fe80::2fc5:ebb9:bf89:5b23%5]) with mapi id 15.20.5813.013; Fri, 11 Nov 2022 07:52:28 +0000 From: "Ashraf Ali S" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Chaganty, Rangasai V" , "Oram, Isaac W" 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: AQHY9TGzZS6gvljzm0WYk1yFAFQy8q45WlUA Date: Fri, 11 Nov 2022 07:52:27 +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: DM4PR11MB5280:EE_|CY5PR11MB6090:EE_ x-ms-office365-filtering-correlation-id: 91f25e66-552b-4d2b-fd98-08dac3b9ade9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IQxjfsFL2TL+FIGRDUEM/hl+rp1O8iAhpT9YC+xZE3vzg2d9tH1PdAiIJShcMG0q9TUEt64FYbtXeS2qZEeMha4RKAk887qfFYdfJF7QjL5eyK2dRX+tIaobS32g1CTbHbd8MQrKOloT+lzg8QPIpLeZ167Trr8URPrixQngoIW7jbGRC2PREa5LmXvqVv7lU7piIGxDPWftuQ/QPg2crQDGEgZ8aLr4aVADdI3A0LHZV8+c1eES/4h00bE9PIId+KKnZMiX1nObifL27jYnN+7bC+fT+Ul382ltwBcSA8770LEQAUuv0S4vvlue+wCIqYPmieqNvoyrt+pHctufCeoLYQneMzUY8YjTT0mPiFc563I1Iyuji1+fmxrU8+IGDaocJOvyjvGqrkFp24BsstuivQEawVRVb2gHNHDqk1iXsgxF/94SkVaRpJ5b0QlvtuD9/I/TGEcFbuQXaVeOEwCBqHIVlZZnaJuh141qzYtWKwA1t8BUuw55ZAwIp6lSV0fY9DGoqWCVRY5xD+sW92sBA+2myRasIEL3YpwdMAW4ZZXWjbNIA+++lmfxNCSAXIbG6dsSgNY4/piKMnlGEwW0lz/r9vlMz6JsiU6nwb6oYjhWFVKwRpKd3kutI45Ja7ClZfYYGdZ4rzxlE8kpYEEwuPvsCBuyib1MjkRCDm+XdAIgAgMSWOCELtqnG8LsfWwfrdFPXUfg7FB9ad6EGGwcsCTCOfDBtClUdJSi9sdC6zDh1EKWmdFpS5II2+0Q4R6i2u7VR3oxRMqClE886w== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB5280.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(6029001)(136003)(366004)(396003)(39860400002)(376002)(346002)(451199015)(82960400001)(86362001)(33656002)(316002)(38100700002)(38070700005)(54906003)(122000001)(110136005)(4326008)(76116006)(5660300002)(52536014)(8676002)(8936002)(64756008)(66556008)(66946007)(186003)(2906002)(83380400001)(26005)(66476007)(55016003)(41300700001)(478600001)(66446008)(9686003)(71200400001)(53546011)(55236004)(7696005)(6506007)(107886003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?Dm7hXnVRRQWlVvFRTaC4C6YbVYGUy1f0yHYjzBomLp0qsyjUp04pEG54AY?= =?iso-8859-1?Q?Vz1lpVVBI2ZaaSz+4opasos9QbtQIxDOWSODH8zYekED5WaB/uO1lChCvE?= =?iso-8859-1?Q?AgB4ttrT0O+k50/r1Lrk4sF9jp9+WkCgDGwQLZq8Ueyw/BzapMywcSuUGE?= =?iso-8859-1?Q?ZuGr3MkvALRQH4x+5TWIYahQceQWCc7mE5ybV0yIM5z3eSC+to3dlVTU91?= =?iso-8859-1?Q?EzjDBXfrpKk4d4fLkDWOR7qUkYPGlxoFqys2XPemjDRDrElFfZHMSOFXLr?= =?iso-8859-1?Q?Mj9l97bP7ZNWJJyKuGHJcjpQOfktouI47iXby57xXqvb2xv0TsxMU2baFC?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YQiYG3IYYcSulpvDyLFSmUaZQzAnt6c/huPVpzeO2W1gX2L?= =?iso-8859-1?Q?Go/YxqWI5/eR18/nDJ0PZU0YUq3Mpms04LiQ1GSlfhsSn4D9OBAuomEH5m?= =?iso-8859-1?Q?1oqA92P+LALei3q0DZm2LpPIQZE4ZRuHrb4Vuccj2jxh0fL+qQ1mWXd8dv?= =?iso-8859-1?Q?YJ5vh2H/brfSKoEdVUNNSceB3IG5KVTex+J+xLTHof75KdBRjSGvG8K18H?= =?iso-8859-1?Q?NxLicl+BO1cWTbEhnlXFkSKpjCaB8ji8p8f25t4G4sFU0k9CRzV30zvy72?= =?iso-8859-1?Q?9KEC9nSCx02928kZJB4PsULq+FYM8hamUfrmCl84jZYq6Pr7rWINuSadPi?= =?iso-8859-1?Q?6pXc1+Hn9smXrwJEKUOa+Eoxw8Sxc398gISlomzQmO2zo2YA+Lqa6maPX3?= =?iso-8859-1?Q?r0aAE3R8PxUF3wGWQB31KNsXXq4G+cxrUm?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5280.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91f25e66-552b-4d2b-fd98-08dac3b9ade9 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2022 07:52:27.9880 (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: 9hIbVs0S361OurTaQdKYxZX9tUlP1GEbH2BicaJuvrChJZ87b45472W2NEFlqlh0YZ2GekruijRaCknrKYNrPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6090 Return-Path: ashraf.ali.s@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Reviewed-by: S, Ashraf Ali Regards, Ashraf Ali S Intel Technology India Pvt. Ltd.=A0 -----Original Message----- From: Kinney, Michael D =20 Sent: Thursday, November 10, 2022 11:54 PM 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