From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.92.20.56]) by mx.groups.io with SMTP id smtpd.web11.17927.1586462794844988866 for ; Thu, 09 Apr 2020 13:06:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=PBy2A/WJ; spf=pass (domain: outlook.com, ip: 40.92.20.56, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QOcvxdpXOmsfbrbgfEKx6E11L4XlpPd6iNLnCWpX6F+RwUktknWasqQT00Vu0KAalIc5SBMURxhG/fVjgLzhgqioQao8xLf/GZFQzdJNE5npsr2czEa1h1a+bteznolQtVdS7BKMUOpl/NrqV6BgqZttTbqi1lDoEaVukqWRkPnhp7O1ST1Mawu0SMDO+uK2PI7tjO3s5h8ZLxM07EU+NjKibrgl4kfRM5jElZQnEkEbJIUtJVPZrhAGEe/1B+q+wCmsUTrDKKXZKa6NMmWviWecnYnVOcdKHo8xro6SsjcblBs3Nc3wn8ZEbYOQyz0ORgtmsbHlYKUBEdfU5M/w+Q== 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=e6ESfFiAHjdRfQIG7ZZWcF6PZdFvW8pYBbiuWb6ZOHQ=; b=OqWrewO8pVYi5C7Q4GzOYo/E6O4zBD/RY8/09Z25/RWxC7TaEWjERm272BjV33nppQmGYwzHb4HcnUlTWqG5+sLJcyeSmv2AUBYramlE6Of6g5HG6mKzBpckQn/ww+CKUBm3/Ql7HI7HgmtvM/QQ39B4Ki9uVCj35iuce/0mMPeSza2G25k2udfyo2GPEHGYxMgNRs4oGrwBUHUdccIl618u32DsIWraPlLwoL5gLi3DA9CdcrGAP7DYiR4viXhYagnSjhMYh4Fr4UZLljEDBMJkpaoj8tZ5BLzMDu8npGKuhjFdl4IEZB9OLhzFSnVXXBTvXOmOQI9S0tR+VCAzCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e6ESfFiAHjdRfQIG7ZZWcF6PZdFvW8pYBbiuWb6ZOHQ=; b=PBy2A/WJ9tvP4a0YX8udBxqzitG0b2N5iRToKTE8cRStxgq8SX4/7F6XD0ZRa6l2eIkZdF3VMdwvWH5keofT0NUS7AGHCz1isQJy9ZTGTaqrixE01+abkjCf6EmKGgYdZOc6/B2xMHzhoxCrAYO6O9ORxff0rtkt0zxh9fhI+h1dNFyJaPbmJpcBlHDrUssWAveEnyiFb2wDPSnn0ACXqB4wgjQIuON1F3pVwXWWoPuPjwX/Lf4pPwmO83+6dtBWOpj/HTc09fN65yFJs+T7tDd7LHxNr88IOr47nL8AFsfPiljD9u9ZElfEqBEb+cUqVOJ7caBSVI236fo+KOGWug== Received: from BN8NAM11FT019.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::4f) by BN8NAM11HT179.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::418) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Thu, 9 Apr 2020 20:06:33 +0000 Received: from DM5PR07MB3435.namprd07.prod.outlook.com (2a01:111:e400:fc4b::44) by BN8NAM11FT019.mail.protection.outlook.com (2a01:111:e400:fc4b::158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.18 via Frontend Transport; Thu, 9 Apr 2020 20:06:33 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:F93A9BF89C0075FD922F69F468920BA9D0067BD061877F0233DF0D7A593AF0BE;UpperCasedChecksum:EE3547E89BB9F995EEE363F6FAFA1D3B78B211DCA0963EF2773D6A6D69EF8A65;SizeAsReceived:7890;Count:49 Received: from DM5PR07MB3435.namprd07.prod.outlook.com ([fe80::801e:fde0:da7d:191f]) by DM5PR07MB3435.namprd07.prod.outlook.com ([fe80::801e:fde0:da7d:191f%6]) with mapi id 15.20.2900.015; Thu, 9 Apr 2020 20:06:33 +0000 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Dandan Bi , Hao A Wu , Jian J Wang , Liming Gao , Ray Ni , Sean Brogan Subject: [PATCH v1 5/7] MdeModulePkg/UfsPassThruDxe: Use BaseLib linked list iteration macros Date: Thu, 9 Apr 2020 13:05:12 -0700 Message-ID: X-Mailer: git-send-email 2.16.3.windows.1 In-Reply-To: <20200409200514.32796-1-michael.kubacki@outlook.com> References: <20200409200514.32796-1-michael.kubacki@outlook.com> X-ClientProxiedBy: MWHPR10CA0062.namprd10.prod.outlook.com (2603:10b6:300:2c::24) To DM5PR07MB3435.namprd07.prod.outlook.com (2603:10b6:4:67::14) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: <20200409200514.32796-6-michael.kubacki@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2001:4898:80e8:7:9d66:7f00:4b99:db3e) by MWHPR10CA0062.namprd10.prod.outlook.com (2603:10b6:300:2c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Thu, 9 Apr 2020 20:06:32 +0000 X-Mailer: git-send-email 2.16.3.windows.1 X-Microsoft-Original-Message-ID: <20200409200514.32796-6-michael.kubacki@outlook.com> X-TMN: [9Ah0tcAfFXfU3858pt8gSfmDutluo4rx8BfYVHnTjqLllBa7J5R/OOR/LwlDtyvM] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: e7b03cca-093b-4acf-1bed-08d7dcc1801b X-MS-TrafficTypeDiagnostic: BN8NAM11HT179: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RC6T22JW5lwT5GNYFcc4N0ssPKeUaKmiN8ty6KBKPub0StKRRGMLc/HSQHp2KRwrfsF04QZlyBjeNKjTM8PBOhXEq8+bqeJkSorCu+sP0WKa1iGSMaOCZYTlJ3Ljd05qYl0GBBS3X/cPaYI78fQuxPcY2l+48bSPy9UV0x9mQPfNOhebCenyfx3AYrU/01isxMENlz7S63EDF/dyvA2kHv5TXCrpO2dk5hCDUAmz9vc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR07MB3435.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: hZbRW4t5xrw/SsYCe0uDqG4C0jH2BkdU5mIMMA7i+oPKUGNcZb99mP1sL5l5N9gUAR8j0ScZSpUIEwzDewDSc0AiqBNwfN72dRBtDXMRX44Bxm+RqRBKWO9fp8UFAhg0iRB2d+YsyqBj9eUxo6cNxmf35/dD/c7G2qInHRryeTWjRIKdNB70+BO9RHYPiFxxO2BjRAhDjg7IF+yrlErTAA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7b03cca-093b-4acf-1bed-08d7dcc1801b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2020 20:06:33.4632 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8NAM11HT179 Content-Type: text/plain From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1959 Replaces usage of the linked list iteration macros defined in UfsPassThru.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 --- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 3 ++- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 3 ++- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h | 9 +-------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c index 26c5a8b85554..9768c2e6fb22 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c @@ -1,6 +1,7 @@ /** @file Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -1083,7 +1084,7 @@ UfsPassThruDriverBindingStop ( // Cleanup the resources of I/O requests in the async I/O queue // if (!IsListEmpty(&Private->Queue)) { - EFI_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) { + BASE_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) { TransReq = UFS_PASS_THRU_TRANS_REQ_FROM_THIS (Entry); // diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c index 93ac958f658f..0b1030ab4788 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c @@ -3,6 +3,7 @@ for upper layer application to execute UFS-supported SCSI cmds. Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -2285,7 +2286,7 @@ ProcessAsyncTaskList ( // Check the entries in the async I/O queue are done or not. // if (!IsListEmpty(&Private->Queue)) { - EFI_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) { + BASE_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) { TransReq = UFS_PASS_THRU_TRANS_REQ_FROM_THIS (Entry); Packet = TransReq->Packet; diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h index cbc0c2126eee..ef33250c89d7 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h @@ -1,6 +1,7 @@ /** @file Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -46,14 +47,6 @@ typedef struct { UINT16 Rsvd:4; } UFS_EXPOSED_LUNS; -// -// Iterate through the double linked list. This is delete-safe. -// Do not touch NextEntry -// -#define EFI_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead) \ - for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\ - Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink) - typedef struct _UFS_PASS_THRU_PRIVATE_DATA { UINT32 Signature; EFI_HANDLE Handle; -- 2.16.3.windows.1