From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.97]) by mx.groups.io with SMTP id smtpd.web10.525.1586561890786000999 for ; Fri, 10 Apr 2020 16:38:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=iGwigjjk; spf=pass (domain: microsoft.com, ip: 40.107.244.97, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mWwmgzleeSsdj4sLBD58sigYQWlAU5Po/xJ0Svgn2zRe5tHnInAJliliXZeKmgh4mrrGISYldb+NsU7aJQ1x4NCzjig/eUfDsgHVsObFg956NUrAm2ul2GQu6ZpudAUYtUYhHCxlJbIFRoW3kWVzkZ0A4+9qrVbUTkV99a8MX746b05lsEei/kuMi3x3gkSJZ3sA4hfViKDUxD8GnnqEAblatjfh6vn9qev0bV0WVs++4VHmZRVb/V7xEVn8jn8vbwP8OoWBphESysvNJ43RMXsIIWtILTN7rA9QDDCZccfOFke/+AYsLHIIWN9E8Twf6Nl3k4soXF/0eSFm+ZKiGQ== 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-SenderADCheck; bh=fvZ2oo8Y0NidrJMSrREyQtRSIW/psHuhAU/uY/zB5ig=; b=Eu2C/z9arzR/Swm7FB05OpfD9SZZaw4Nzrmp/93dViWAUCmU/xrJQfQ7/Kasu7lvF/Z/gBE9uqLhAwfruSa6EHcFl+n8qKCgmVyh+pIJs5n6x/9v65PbezQNW64PIK8BhKmlymb8VZ+xLnekfqUQT886ckRcWWSn3//rbx/pdDHU2MBvhnrST70N8U+NRCEAU9ASRGmxb4c9zFkLPxCieSPlL2uH2HoGAR42o55pF1+cQV8dJvlM6qTri7L7+p6pBxRrtUEJec/w1esEm3uc1TSIJuvgv1zdIyX5mJZDnM6bbonQRSEtQWf91MFdffazFlGkmdcLtt9dMhcZVHZpdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fvZ2oo8Y0NidrJMSrREyQtRSIW/psHuhAU/uY/zB5ig=; b=iGwigjjkPAuEoC8AxcR9yaAnRZfqWqnTr40YCvqAqRflFKMfEoEELZiVl9iC8S5A5BRNATArWrnFnONog+u/FzZch5tJYr3V1sMpF232x+0qjsrHLWzS22MNI8JRZhXKpaKepg4cAv9izc0NtrP/AN1e8U5y/AKMwmX3QUNTjKM= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by CY4PR21MB0790.namprd21.prod.outlook.com (2603:10b6:903:13b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.2; Fri, 10 Apr 2020 23:38:09 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318%12]) with mapi id 15.20.2921.009; Fri, 10 Apr 2020 23:38:09 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: Dandan Bi , Hao A Wu , Jian J Wang , Liming Gao , Ray Ni , Sean Brogan Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v2 3/7] MdeModulePkg/EhciPei: Use BaseLib linked list iteration macros Thread-Topic: [EXTERNAL] [edk2-devel] [PATCH v2 3/7] MdeModulePkg/EhciPei: Use BaseLib linked list iteration macros Thread-Index: AQHWD3MEzBzy95TS/Ee5Pa8pNLJfrKhzA0NX Date: Fri, 10 Apr 2020 23:38:09 +0000 Message-ID: References: <20200410200218.24992-1-michael.kubacki@outlook.com>, In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-04-10T23:38:04.8084473Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bret.Barkelew@microsoft.com; x-originating-ip: [71.212.145.195] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8b327493-31f2-4f67-f97e-08d7dda83a0a x-ms-traffictypediagnostic: CY4PR21MB0790:|CY4PR21MB0790: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 0369E8196C x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR21MB0743.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(4636009)(136003)(39860400002)(376002)(396003)(366004)(346002)(7696005)(8990500004)(76116006)(66946007)(8676002)(26005)(186003)(82950400001)(33656002)(19627235002)(91956017)(8936002)(53546011)(82960400001)(6506007)(71200400001)(66476007)(4326008)(52536014)(478600001)(5660300002)(107886003)(54906003)(966005)(10290500003)(2906002)(316002)(66446008)(81156014)(66556008)(55016002)(64756008)(86362001)(110136005)(9686003);DIR:OUT;SFP:1102; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: I+mtoYDEsmEuM5TyBdwolPeTOZQZk1Y/KmLa9XSlSexJ28zZekL/PKIGXVILzq1gEY1kbrf1UcXylhT67gp5SKTE8EK0b1pveksF5tmFcdxLlOQ9KtlM3DMCn/74XtMQ2hVNldJuvOIoCsU2Ly2dKeTwLkGhRUFJVKn28EgVuQpHV1jUiqs1vBH+QcRA3+9zDHXmjVinBS3b2wZNKUsAVrFzdybneFd8YgZpyo9QaKGp+d+j9h3c2KcaGagzaU9bMJRVRCglvqEUhocCy7hD7H3GrSQX3243eiWVWii6+/o1ndiZdVwkISInpxJBrplpiQzQ5rX+hxlovyL7G2fnUx/hTEWiyp529F8I4qugzM5/7pVbYHoJINg10FhdU2+2dss2hPVzWD1O4Zek7xeZoXS6DVqvkqeG+NiQZNfQluC7gyjamsc+0zsKHUm7oE+7bOOyXbtnq1s8Vj7Uvk3ADfPa7qbm2JXckVU+o4dG6KU8ATrVzGzDLEm88TWrDdaZMt7Bu9TkS9eDRNDlcACWPg== x-ms-exchange-antispam-messagedata: YLCyCcchqT8vZc2j3SlYjQAgIDIR1zczizKzn76Hf6fIBhLKc2fRc5KL9fMywoGT5oBrf6nqcr5dbH/Enle2t/LN2Q8eJvjKd6B15AXqPO8ocE5C+y0oIteV3blCJ/uJcMFFKbQMvCtScFlr1QbRxg== MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b327493-31f2-4f67-f97e-08d7dda83a0a X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2020 23:38:09.2517 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wZRd+kvt5P0d1wkSOHlAKpZqTSquGE7SC47hvr0FZBzBcqtkhcjqyQhgm0mglar23Wq3rZb7JOjjVmOVG30isQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0790 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR21MB0743A1240E6C5BC7B73F296CEFDE0CY4PR21MB0743namp_" --_000_CY4PR21MB0743A1240E6C5BC7B73F296CEFDE0CY4PR21MB0743namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bret Barkelew - Bret ________________________________ From: devel@edk2.groups.io on behalf of Michael Kub= acki via groups.io Sent: Friday, April 10, 2020 1:02:14 PM To: devel@edk2.groups.io Cc: Dandan Bi ; Hao A Wu ; Jian J= Wang ; Liming Gao ; Ray Ni ; Sean Brogan Subject: [EXTERNAL] [edk2-devel] [PATCH v2 3/7] MdeModulePkg/EhciPei: Use = BaseLib linked list iteration macros From: Michael Kubacki REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbu= gzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D1959&data=3D02%7C01%7CBret.B= arkelew%40microsoft.com%7C2dea7084273f465de25608d7dd8a25f0%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637221457723162038&sdata=3DDgZueRYdKEycj4i= AeW4tVpSH5ptQcz3NSuCv35XUGDM%3D&reserved=3D0 Replaces usage of the linked list iteration macros defined in EhcPeim.h with the common definition in BaseLib.h. Cc: Dandan Bi Cc: Hao A Wu Cc: Jian J Wang Cc: Liming Gao Cc: Ray Ni Cc: Sean Brogan Signed-off-by: Michael Kubacki Reviewed-by: Guomin Jiang Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 3 ++- MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 5 +++-- MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h | 16 ++-------------- MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf | 2 ++ 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c b/MdeModulePkg/Bus/P= ci/EhciPei/EhciSched.c index 8eb432dfc31d..311f50198062 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c @@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPe= iUsbControllerPpiGuid which is used to enable recovery function from USB Drivers. Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -323,7 +324,7 @@ EhcCheckUrbResult ( goto ON_EXIT; } - EFI_LIST_FOR_EACH (Entry, &Urb->Qh->Qtds) { + BASE_LIST_FOR_EACH (Entry, &Urb->Qh->Qtds) { Qtd =3D EFI_LIST_CONTAINER (Entry, PEI_EHC_QTD, QtdList); QtdHw =3D &Qtd->QtdHw; State =3D (UINT8) QtdHw->Status; diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c b/MdeModulePkg/Bus/Pci= /EhciPei/EhciUrb.c index 995ccd2463d2..df512ed6fa59 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c @@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPe= iUsbControllerPpiGuid which is used to enable recovery function from USB Drivers. Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -290,7 +291,7 @@ EhcFreeQtds ( EFI_LIST_ENTRY *Next; PEI_EHC_QTD *Qtd; - EFI_LIST_FOR_EACH_SAFE (Entry, Next, Qtds) { + BASE_LIST_FOR_EACH_SAFE (Entry, Next, Qtds) { Qtd =3D EFI_LIST_CONTAINER (Entry, PEI_EHC_QTD, QtdList); RemoveEntryList (&Qtd->QtdList); @@ -461,7 +462,7 @@ EhcCreateQtds ( // // OK, all the QTDs needed are created. Now, fix the NextQtd point // - EFI_LIST_FOR_EACH (Entry, &Qh->Qtds) { + BASE_LIST_FOR_EACH (Entry, &Qh->Qtds) { Qtd =3D EFI_LIST_CONTAINER (Entry, PEI_EHC_QTD, QtdList); // diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h b/MdeModulePkg/Bus/Pci= /EhciPei/EhcPeim.h index 6b69f7a656ce..8e5b6418e6ee 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h @@ -2,6 +2,7 @@ Private Header file for Usb Host Controller PEIM Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -17,6 +18,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include +#include #include #include #include @@ -60,20 +62,6 @@ typedef struct _PEI_USB2_HC_DEV PEI_USB2_HC_DEV; // #define EHC_SYNC_POLL_INTERVAL (6 * EHC_1_MILLISECOND) -// -//Iterate through the double linked list. NOT delete safe -// -#define EFI_LIST_FOR_EACH(Entry, ListHead) \ - for(Entry =3D (ListHead)->ForwardLink; Entry !=3D (ListHead); Entry =3D= Entry->ForwardLink) - -// -//Iterate through the double linked list. This is delete-safe. -//Don't touch NextEntry -// -#define EFI_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead) \ - for(Entry =3D (ListHead)->ForwardLink, NextEntry =3D Entry->ForwardLink= ;\ - Entry !=3D (ListHead); Entry =3D NextEntry, NextEntry =3D Entry->Fo= rwardLink) - #define EFI_LIST_CONTAINER(Entry, Type, Field) BASE_CR(Entry, Type, Field= ) diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf b/MdeModulePkg/Bus/P= ci/EhciPei/EhciPei.inf index 0fc09ffca434..01ebb371a72e 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf @@ -5,6 +5,7 @@ # which is used to enable recovery function from USB Drivers. # # Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -47,6 +48,7 @@ [LibraryClasses] IoLib TimerLib + BaseLib BaseMemoryLib PeimEntryPoint PeiServicesLib -- 2.16.3.windows.1 --_000_CY4PR21MB0743A1240E6C5BC7B73F296CEFDE0CY4PR21MB0743namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Reviewed-by: Bret Barkelew <bret.barkelew@micros= oft.com>

 

- Bret

 


From: devel@edk2.groups.io= <devel@edk2.groups.io> on behalf of Michael Kubacki via groups.io &l= t;michael.kubacki=3Doutlook.com@groups.io>
Sent: Friday, April 10, 2020 1:02:14 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Dandan Bi <dandan.bi@intel.com>; Hao A Wu <hao.a.wu@in= tel.com>; Jian J Wang <jian.j.wang@intel.com>; Liming Gao <limi= ng.gao@intel.com>; Ray Ni <ray.ni@intel.com>; Sean Brogan <sean= .brogan@microsoft.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v2 3/7] MdeModulePkg/EhciPe= i: Use BaseLib linked list iteration macros
 
From: Michael Kubacki <michael.kubacki@microso= ft.com>

REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbu= gzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D1959&amp;data=3D02%7C01%7CBr= et.Barkelew%40microsoft.com%7C2dea7084273f465de25608d7dd8a25f0%7C72f988bf86= f141af91ab2d7cd011db47%7C1%7C0%7C637221457723162038&amp;sdata=3DDgZueRY= dKEycj4iAeW4tVpSH5ptQcz3NSuCv35XUGDM%3D&amp;reserved=3D0

Replaces usage of the linked list iteration macros defined in EhcPeim.h with the common definition in BaseLib.h.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c |  3 ++-
 MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c   |  5 +&#= 43;+--
 MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h   | 16 ++--= ------------
 MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf |  2 ++
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c b/MdeModulePkg/Bus/P= ci/EhciPei/EhciSched.c
index 8eb432dfc31d..311f50198062 100644
--- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
+++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
@@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on= gPeiUsbControllerPpiGuid
 which is used to enable recovery function from USB Drivers.
 
 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.&l= t;BR>
+Copyright (c) Microsoft Corporation.<BR>
 
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -323,7 +324,7 @@ EhcCheckUrbResult (
     goto ON_EXIT;
   }
 
-  EFI_LIST_FOR_EACH (Entry, &Urb->Qh->Qtds) {
+  BASE_LIST_FOR_EACH (Entry, &Urb->Qh->Qtds) {
     Qtd   =3D EFI_LIST_CONTAINER (Entry, PE= I_EHC_QTD, QtdList);
     QtdHw =3D &Qtd->QtdHw;
     State =3D (UINT8) QtdHw->Status;
diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c b/MdeModulePkg/Bus/Pci= /EhciPei/EhciUrb.c
index 995ccd2463d2..df512ed6fa59 100644
--- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c
+++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c
@@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on= gPeiUsbControllerPpiGuid
 which is used to enable recovery function from USB Drivers.
 
 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.&l= t;BR>
+Copyright (c) Microsoft Corporation.<BR>
 
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -290,7 +291,7 @@ EhcFreeQtds (
   EFI_LIST_ENTRY        = ;  *Next;
   PEI_EHC_QTD        &n= bsp;    *Qtd;
 
-  EFI_LIST_FOR_EACH_SAFE (Entry, Next, Qtds) {
+  BASE_LIST_FOR_EACH_SAFE (Entry, Next, Qtds) {
     Qtd =3D EFI_LIST_CONTAINER (Entry, PEI_EHC_QTD, Q= tdList);
 
     RemoveEntryList (&Qtd->QtdList);
@@ -461,7 +462,7 @@ EhcCreateQtds (
   //
   // OK, all the QTDs needed are created. Now, fix the NextQtd = point
   //
-  EFI_LIST_FOR_EACH (Entry, &Qh->Qtds) {
+  BASE_LIST_FOR_EACH (Entry, &Qh->Qtds) {
     Qtd =3D EFI_LIST_CONTAINER (Entry, PEI_EHC_QTD, Q= tdList);
 
     //
diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h b/MdeModulePkg/Bus/Pci= /EhciPei/EhcPeim.h
index 6b69f7a656ce..8e5b6418e6ee 100644
--- a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h
+++ b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h
@@ -2,6 +2,7 @@
 Private Header file for Usb Host Controller PEIM
 
 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.&l= t;BR>
+Copyright (c) Microsoft Corporation.<BR>
 
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -17,6 +18,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Ppi/IoMmu.h>
 #include <Ppi/EndOfPeiPhase.h>
 
+#include <Library/BaseLib.h>
 #include <Library/DebugLib.h>
 #include <Library/PeimEntryPoint.h>
 #include <Library/PeiServicesLib.h>
@@ -60,20 +62,6 @@ typedef struct _PEI_USB2_HC_DEV PEI_USB2_HC_DEV;  //
 #define EHC_SYNC_POLL_INTERVAL       (= 6 * EHC_1_MILLISECOND)
 
-//
-//Iterate through the double linked list. NOT delete safe
-//
-#define EFI_LIST_FOR_EACH(Entry, ListHead)    \
-  for(Entry =3D (ListHead)->ForwardLink; Entry !=3D (ListHead); E= ntry =3D Entry->ForwardLink)
-
-//
-//Iterate through the double linked list. This is delete-safe.
-//Don't touch NextEntry
-//
-#define EFI_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead)  &nb= sp;         \
-  for(Entry =3D (ListHead)->ForwardLink, NextEntry =3D Entry->= ForwardLink;\
-      Entry !=3D (ListHead); Entry =3D NextEntry= , NextEntry =3D Entry->ForwardLink)
-
 #define EFI_LIST_CONTAINER(Entry, Type, Field) BASE_CR(Entry, Type, = Field)
 
 
diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf b/MdeModulePkg/Bus/P= ci/EhciPei/EhciPei.inf
index 0fc09ffca434..01ebb371a72e 100644
--- a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf
+++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf
@@ -5,6 +5,7 @@
 # which is used to enable recovery function from USB Drivers.
 #
 # Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.= <BR>
+# Copyright (c) Microsoft Corporation.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -47,6 +48,7 @@
 [LibraryClasses]
   IoLib
   TimerLib
+  BaseLib
   BaseMemoryLib
   PeimEntryPoint
   PeiServicesLib
--
2.16.3.windows.1




--_000_CY4PR21MB0743A1240E6C5BC7B73F296CEFDE0CY4PR21MB0743namp_--