From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.92.22.90]) by mx.groups.io with SMTP id smtpd.web10.4841.1586548974277268626 for ; Fri, 10 Apr 2020 13:02:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=XEllt1j8; spf=pass (domain: outlook.com, ip: 40.92.22.90, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PRYNKQ3yc5yyT3HO/yFMcTJ5eEWy99X8t0li1fL2bzu/6nG7KnjPkhcReAYfBgXASuk1sX8Rx6U+VgnmpGt7hyRE5u9qS/V8YKGZMHfpU3Q5b/pBKaJ8Ww701bhDipexQZffYgunegVbK4XKGQ5IfVg9mu4LJlWlBmYwi6UTM4DSK8PreG09T4iw4SrsLvMFaa5PbwKqw09t2jXYu/WBsAnmdJZLRlpF3ssxm+lYO05l5zgAOW+5McI9insKhTeQPmCmgIPEK5RnkeuTEHGhg0H3ECOZ9FQOENOF+UTKlU8syxcVaG3WDj6G23z7paZHhGdvuV4RJcR7zyp+OB+nbQ== 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=1ZMUlcY2fWCofDNYu3oXbzqr5CO7BWOm8NgL5MxQgCk=; b=nkIICtrkLovDflPCNdduWup0yFEZpQMCY55DI/viNaZcZ3EIwTSXQr+LdRhhODj3vpgY8vC2Uexf5nwG/D0rYofJvkKlEtKasjtkr76ewUMH3TvE77b6ON9NYiunFx3wOqkjH9fJizR+RvavB6A3Jq70yeN2PeUAzH9uJAnei2pmrDdIBKvlYI6kYbXVMXWfdZ0hlHG9gpuZZGKGlWBFYbgLejP2TODs+D5veQb6tktyP5MyZnDIP9upPONyk/BCKEtZRakNjqpCcgkrkfD8MxrI3vtQFfijBxGhyFqFfzNF+nT8dC6TDxtQMnlnU4OIm13fs3gV1oNxAEwds2hoRg== 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=1ZMUlcY2fWCofDNYu3oXbzqr5CO7BWOm8NgL5MxQgCk=; b=XEllt1j88CGLqsEfes+v5FS0UG79LeLNfB8Hol9ZR49rQAhMMr1vt9HDKOOCwwDx+r3Ka6RblJMGn3ZK18XCeNZj/No6ry2E+DW6+fuV89UhuBEkHc9aUmD/fPqDQw6OwrZZJw5c/91ATDASvTesITgVtpoCJIC5h2JtUPbiKSpusLBn7jOqMFFWuPHB0tBliqX7Bc1QadwcWyn+naVcIllkpZrcPRG3AokYsAU1VutwKbk3Fz5g1uyeMZQrDtj8imGGnV9Tah3f+F0EuGQq0oot2JWXBI54T+2o545iOEf1yT4oKv3Uy/2c+E8oo7qEVYokGVjo1/pSIcVx6EsToA== Received: from MW2NAM12FT048.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::48) by MW2NAM12HT081.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::373) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.12; Fri, 10 Apr 2020 20:02:53 +0000 Received: from MWHPR07MB3440.namprd07.prod.outlook.com (2a01:111:e400:fc65::48) by MW2NAM12FT048.mail.protection.outlook.com (2a01:111:e400:fc65::215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.12 via Frontend Transport; Fri, 10 Apr 2020 20:02:53 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2CBF099D929E26011168BA332006399E4D414C26A6F045B01405118C8CA01F81;UpperCasedChecksum:9F9FFA63EE9412452B68635ED21F303332A2594AEAA8C4768ED7A32D089DD637;SizeAsReceived:7899;Count:49 Received: from MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::bcc9:271b:20db:52e3]) by MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::bcc9:271b:20db:52e3%6]) with mapi id 15.20.2900.015; Fri, 10 Apr 2020 20:02:53 +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 v2 5/7] MdeModulePkg/UfsPassThruDxe: Use BaseLib linked list iteration macros Date: Fri, 10 Apr 2020 13:02:16 -0700 Message-ID: X-Mailer: git-send-email 2.16.3.windows.1 In-Reply-To: <20200410200218.24992-1-michael.kubacki@outlook.com> References: <20200410200218.24992-1-michael.kubacki@outlook.com> X-ClientProxiedBy: MWHPR01CA0033.prod.exchangelabs.com (2603:10b6:300:101::19) To MWHPR07MB3440.namprd07.prod.outlook.com (2603:10b6:301:69::28) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: <20200410200218.24992-6-michael.kubacki@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2001:4898:80e8:1:71cb:63a2:e2d4:2255) by MWHPR01CA0033.prod.exchangelabs.com (2603:10b6:300:101::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 20:02:52 +0000 X-Mailer: git-send-email 2.16.3.windows.1 X-Microsoft-Original-Message-ID: <20200410200218.24992-6-michael.kubacki@outlook.com> X-TMN: [h+oVCmeBv867B07aSNGAIEArgPHUY8QK/xsWt2fzrbNtwQHl9MDKa+bFS6PpKuq1] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 6d69a3ee-034d-4b02-3874-08d7dd8a271e X-MS-TrafficTypeDiagnostic: MW2NAM12HT081: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wMVbNKGkCNU7zn9x3tClRUSmHYUZVExUXgEq2gXTFlPaasjwpMYuPpnZilDsNK6bciJTMwZxF+zVxKczYjvoxSnquWx2ISIBUDSFwYwj9h+1K6vFS4G9otiaKpMJ2CqnsyBZTEVZmu6DOLNjkLYwlaynbmt2Z3cvwHVg4ugX5xYZIGXkLaiEUirrRpE6V/ZZkAqHZRZ8apFPIHstx0CwBlienFBUr8/kWoYVz7KwMB8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR07MB3440.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: ZMq0bBNr19XsDTAAiM8KyFmwjkHkhk5p8SX0JPJZi6PdHxQpFMRqhOUeU9OfnK44W8Ksa+mplj2Bnp1pRhkwuDx4+kavD+aRrM79Z9UPs90FLmP1NTKqbS34pfwLWkSFIEcx3y1xG2LMAW+ernYuV/AwtemSr+yCZw0/4DvNpv/LydWvP7ZvEry6niwaLPNC+3a6FHfMoUqwyZOh4QPcAg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d69a3ee-034d-4b02-3874-08d7dd8a271e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 20:02:52.9760 (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: MW2NAM12HT081 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 Reviewed-by: Hao A Wu --- 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