From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.1657.1586483241162781607 for ; Thu, 09 Apr 2020 18:47:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=DYynkQQI; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: guomin.jiang@intel.com) IronPort-SDR: YUoMcURl8y4hgFrtf3KgcJEFBP20SqdHyaD9xI2VYa9F+9IK5pqcLFdWBUGDlDyOiy1BYaluQk vDomlzIw9xog== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2020 18:47:21 -0700 IronPort-SDR: g28wI3MnChY3T4Y6UWKQFb8fCQQ36UJiCuzaHBKnV2PnPDLDKXJ23kVd05V6rKCgofniI6PFKB s1gxNs5VMc4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,364,1580803200"; d="scan'208";a="244466100" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga008.fm.intel.com with ESMTP; 09 Apr 2020 18:47:21 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 9 Apr 2020 18:47:20 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 9 Apr 2020 18:47:20 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 9 Apr 2020 18:47:20 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 9 Apr 2020 18:47:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pyq4toJcwE6zqUGmOX5LAtWHFwOoOstcc9gkvif3h+I+YYmRLJlWPwPvoqSv6/AfnOSISPTZwJV9g/CMzkJDNBtXw4FSSaqecNaIp+2di+zJ8F/2t0AWosYO+6pf5Q2My88gm9oIVx0Z5Ibil2KkS6UqassAB7uEL10kdRedchqhQoTVsDJ3hTVsm636ld+brZSP8EfRxZHO9b6anL52aE/NcOZDZfv+YVvvPSpLqQMFq0nMwtEGfL1g6MsU7QiCVvCJPAOb0yC5J8UTyVT0z+vwacLyvnfafFkaR38MNv45JObNzy7roaTPU2AKuKo33K7580WsumivlkleW1LZbA== 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=pYYoWjilav+OTtSOLG5ei6NdrYt7b+yQx9sfrpcyri8=; b=cUblRGWsL/i7M1lmFsxep7da5n9o5GNT3AT3j7Rljb/VdwjMlKJewaZ94TiQkBMff0jRGLkWp6SE5c3p0RmipUZ/+2Sol6reZa6cIbFPS0cfFjh4BTtR2RCNtMz4vghDnpOVZRgTXKpFBajAoe3DDrq6hLaf84FWUtJIrLrVDxWa+olehJQcj4IoRpIT34DsTWYkxelnimFyahVqT63QBoHzTrwoDeKxEMPLYsbIoKAW5jA3Qp6Wcfgs+eg7QAZ5W8qtvZ75U1fYKaiXlxsJN/7Ddc/CV3P2j1Rbqe7qr9bUxtUKR649BEIpjHx8OQZcDtXbV0z2vLs4mXhZ6jCTJQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pYYoWjilav+OTtSOLG5ei6NdrYt7b+yQx9sfrpcyri8=; b=DYynkQQI07P26pUIbxS3AoE4gmeZWjIekO7ZQSTIRH8+0jYzdycoWJwWl3g1ttCVFV/ivE5ZlHh6TFJx/TyFSN48mqiXnYJnC+mET4O68ezPHEy8mXCg8f6uiXBj/I9wJjOg4SXCpX7d4JKxNo+zL5XIjHHIkT0vnrnpR/0jm6U= Received: from DM6PR11MB2955.namprd11.prod.outlook.com (2603:10b6:5:65::31) by DM6PR11MB3675.namprd11.prod.outlook.com (2603:10b6:5:13e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 01:47:09 +0000 Received: from DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::f1ec:734d:b127:4519]) by DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::f1ec:734d:b127:4519%3]) with mapi id 15.20.2878.022; Fri, 10 Apr 2020 01:47:08 +0000 From: "Guomin Jiang" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: "Bi, Dandan" , "Wu, Hao A" , "Wang, Jian J" , "Gao, Liming" , "Ni, Ray" , Sean Brogan Subject: Re: [edk2-devel] [PATCH v1 3/7] MdeModulePkg/EhciPei: Use BaseLib linked list iteration macros Thread-Topic: [edk2-devel] [PATCH v1 3/7] MdeModulePkg/EhciPei: Use BaseLib linked list iteration macros Thread-Index: AQHWDqpt9xa32dI27UOpGKaXxfjYNKhxlndw Date: Fri, 10 Apr 2020 01:47:08 +0000 Message-ID: References: <20200409200514.32796-1-michael.kubacki@outlook.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: spf=none (sender IP is ) smtp.mailfrom=guomin.jiang@intel.com; x-originating-ip: [192.55.52.200] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7e3c350e-4746-4006-3864-08d7dcf114c6 x-ms-traffictypediagnostic: DM6PR11MB3675: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2887; x-forefront-prvs: 0369E8196C x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB2955.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(366004)(396003)(39860400002)(376002)(136003)(346002)(4326008)(33656002)(76116006)(66446008)(66556008)(81166007)(52536014)(5660300002)(66476007)(9686003)(66946007)(64756008)(54906003)(26005)(53546011)(45080400002)(6506007)(478600001)(19627235002)(81156014)(186003)(2906002)(316002)(8936002)(966005)(7696005)(86362001)(110136005)(55016002)(71200400001)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rb1wge8LtbRQ6Yfjt2FCD4RIoIcldNMpzJCvJtf4A7Ne0H2tVSMXAhigcS4gQROCMoWFFsK3YBOUh54fe+LwAPjT9qyAjgyx4sAeDwf0AwDRsgtwGePRL8Bvcvb5qdBV+y8N+IvsRTPw+l/hR1MWQQDzMIp+d1kYU7LwAZt5PWlq4XFgdiWYLybMB8JUmObwFvBjX/dHa8JwO9mTkodqgXlir5ZesSycUGoNWq61Fko/pooiENt6W1hBawQLfptDjXy6Dv/IpVXjqCpdhV0i5kqggvEGHXS3Kub5HgzjEvPU4uRKz/dmfoXLXUC6kaM/UztDQY+pmnalUYP1Lyb3/RizBowVo5GZBrMNvL9jM89s9vTebLX0OSu0e0TuwZgDsqM3FbzPoRhUZpZsxS+YTSTI0P1uHqiNE21szugxwb/5DsRyNmv/uZCFWD5cKLRPpzGxiofEGMDZ33K1Fm5E2tG6vYb6/H7J6GNwjnsRtlpltbqoI5kJiwlkMu4QU0+sITK/eM24gExwpJLE0ZLIrw== x-ms-exchange-antispam-messagedata: QPiAL+LX/wrUqoDBuTXIuB90XEYWqDDovBnhsY7QJu1HacFDbLMmemGM5w/7mF++47VGED7hoRzrpXg8QUkW36VKDgUn9bBc+88CpxEY4pZOqVbMLVbrSRO7/vFG2wt8u/BRB2k6gyDafP28dUaDDw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7e3c350e-4746-4006-3864-08d7dcf114c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2020 01:47:08.8289 (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: U0Cej1CkgdRR7HxVqTuwa01B1M0wc/OTyYcjtrIffBnByXQP1XlePTqIa/niPJw35WvuKxx0OFHfij55fr8klA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3675 Return-Path: guomin.jiang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Guomin Jiang > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Michael > Kubacki > Sent: Friday, April 10, 2020 4:05 AM > To: devel@edk2.groups.io > Cc: Bi, Dandan ; Wu, Hao A ; > Wang, Jian J ; Gao, Liming = ; > Ni, Ray ; Sean Brogan > Subject: [edk2-devel] [PATCH v1 3/7] MdeModulePkg/EhciPei: Use BaseLib > linked list iteration macros >=20 > From: Michael Kubacki >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1959 >=20 > Replaces usage of the linked list iteration macros defined in EhcPeim.h = with > the common definition in BaseLib.h. >=20 > 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 > --- > MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 3 ++- > MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 5 +++-- > MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h | 15 +-------------- > 3 files changed, 6 insertions(+), 17 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c > b/MdeModulePkg/Bus/Pci/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 f= rom > USB Drivers. >=20 > Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) Microsoft Corporation.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -323,7 +324,7 @@ EhcCheckUrbResult ( > goto ON_EXIT; > } >=20 > - 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 gPeiUsbControllerPpiGuid which is used to enable recovery function f= rom > USB Drivers. >=20 > Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) Microsoft Corporation.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -290,7 +291,7 @@ EhcFreeQtds ( > EFI_LIST_ENTRY *Next; > PEI_EHC_QTD *Qtd; >=20 > - 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); >=20 > 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); >=20 > // > diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h > b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h > index 6b69f7a656ce..962cbc458986 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 >=20 > Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) Microsoft Corporation.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -60,20 +61,6 @@ typedef struct _PEI_USB2_HC_DEV PEI_USB2_HC_DEV; > // > #define EHC_SYNC_POLL_INTERVAL (6 * EHC_1_MILLISECOND) >=20 > -// > -//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->ForwardLi= nk;\ > - Entry !=3D (ListHead); Entry =3D NextEntry, NextEntry =3D Entry->= ForwardLink) > - > #define EFI_LIST_CONTAINER(Entry, Type, Field) BASE_CR(Entry, Type, Fie= ld) >=20 >=20 > -- > 2.16.3.windows.1 >=20 >=20 >=20