From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web09.648.1572487154810413783 for ; Wed, 30 Oct 2019 18:59:14 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: hao.a.wu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 18:59:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,249,1569308400"; d="scan'208";a="225536323" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 30 Oct 2019 18:59:14 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 30 Oct 2019 18:59:12 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.60]) with mapi id 14.03.0439.000; Thu, 31 Oct 2019 09:59:08 +0800 From: "Wu, Hao A" To: "Zhang, Shenglei" , "devel@edk2.groups.io" CC: "Ni, Ray" Subject: Re: [PATCH v2 1/3] MdeModulePkg/EhciPei: Initialize the variable Map Thread-Topic: [PATCH v2 1/3] MdeModulePkg/EhciPei: Initialize the variable Map Thread-Index: AQHVjyuKvK+UNk6A4UW/Me68FYlBKadz/y8g Date: Thu, 31 Oct 2019 01:59:07 +0000 Message-ID: References: <20191030140830.31156-1-shenglei.zhang@intel.com> <20191030140830.31156-2-shenglei.zhang@intel.com> In-Reply-To: <20191030140830.31156-2-shenglei.zhang@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Zhang, Shenglei > Sent: Wednesday, October 30, 2019 10:08 PM > To: devel@edk2.groups.io > Cc: Wu, Hao A; Ni, Ray > Subject: [PATCH v2 1/3] MdeModulePkg/EhciPei: Initialize the variable Map >=20 > Map is used but not Initialized. > Map is called by IoMmuMap, in which Mapping(Map) is called by IoMmu- > >Map. > We can not assume Map is given an initial value at any step. Reviewed-by: Hao A Wu Best Regards, Hao Wu >=20 > Cc: Hao A Wu > Cc: Ray Ni > Signed-off-by: Shenglei Zhang > --- > MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c > b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c > index 7c6a6a5f9716..995ccd2463d2 100644 > --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c > +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c > @@ -534,6 +534,8 @@ EhcCreateUrb ( > PEI_URB *Urb; > VOID *Map; >=20 > + Map =3D NULL; > + > Urb =3D Ehc->Urb; > Urb->Signature =3D EHC_URB_SIG; > InitializeListHead (&Urb->UrbList); > -- > 2.18.0.windows.1