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.92.23.45]) by mx.groups.io with SMTP id smtpd.web11.4840.1586548958874095420 for ; Fri, 10 Apr 2020 13:02:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=oJW4dOym; spf=pass (domain: outlook.com, ip: 40.92.23.45, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Eh0EbEtHvgMPKmGKSdwK+QKHpEzkCmdMOjJglMNVlqZWSZxh6ELUOKir3F/Ag5aexZFAuIlnHzDImrsZYkHZKj3T8U40P4MyeOMlts/PlH7NhoJ5GQwrlVlclWGYf1y5QN3/qPsOOh7K21r0XlzijT+CgQqZlHwfqjcv7HQnqapO9HjnE6Pn1Ho7h1esHi1EEK9SsxKaTAUV6wP6mJCaCprl+O1v1r4my1yRGrm0w+etyUXakpAPAEAv162Uw7ZFAafntVZJHQycT+avd7l7nvBtV6fo5TIRMe3+6H5hjY9i3ETsPH1HsZsMok5aVW2HyqMQMQ/OyMG2R5wWAJcmNQ== 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=KAZQUgLA+c4stipGvGIraeDB0SZEbbsMF+tuBIeon94=; b=RXa8x0HPyHx+cmThGftTr1oydsCVKxJTb/ilvFld3jMbUPsl3iBFHyLGRwT6bGhqd5v/Z2kxwZuJC9nx9OsUcwMgPKNxilVFb8k6wr4F7NQtP4c3aU/r/EmQ2IJDameeQCWvfKTnJYkNVZg+8CcWTSdcXewhOvvXvHTilWf/f+1Hvu3hdVKxQDyCTv1YLcjBqVLFjXSzk4QAsCGLQNhXW6fuHcHS06ZbKAcm0MZYNSAk8SIzFtfzMBIfuxpoAZ4vZcrBy7DKjAwskPPN4WuMRmq4kI85hy7i8bM2SF1phmC5nqAXN6Qq3eDorqyAARX3EXNyR8F+5ikmzmKzwmRffA== 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=KAZQUgLA+c4stipGvGIraeDB0SZEbbsMF+tuBIeon94=; b=oJW4dOymopHuvRM+JapBA04QQlrJsquxPUTG1/i3V/jH/29ZVgVuza1IPrFJWfnFhSOXmKNtqzURQo6kiglvQ+g0UzxEbIMD46k5fpp/Nhe1MG0vKzS7J5soeL6mSE5GnQ7XA0l7VN+3kpRBr7BpBS/M6XmDI0/kSmTTIsIoCrgrBv58l3FwDdNIfI6a0TrtR9Q/eCbig2Gz3MisCSmMb9+eUjzC9nPxdQ9HJntvehgSA/GuzDruOEsASmaqjB6Lj+O0npfJ6JTuFRGsPGRkxbbRxF+drP9jO4sffC0UCtzYaI1l+zm0VtPzNWrtxMFTOKEaCJKyOgNJncgO5PLVww== Received: from MW2NAM12FT048.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::4f) by MW2NAM12HT176.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::294) 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:37 +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:37 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:8637BDECD23407B51973BE52AB1F006DCC47598A3ACAD85B695D4B386C295323;UpperCasedChecksum:84434F1E4250A5B75A83E38C9EED595AF60370B7FC6C96603441F9E5AE11730F;SizeAsReceived:7830;Count:47 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:37 +0000 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chao Zhang , Dandan Bi , Hao A Wu , Jian J Wang , Liming Gao , Michael D Kinney , Ray Ni , Sean Brogan Subject: [PATCH v2 0/7] Add linked list iteration macros to BaseLib.h Date: Fri, 10 Apr 2020 13:02:11 -0700 Message-ID: X-Mailer: git-send-email 2.16.3.windows.1 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-1-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:36 +0000 X-Mailer: git-send-email 2.16.3.windows.1 X-Microsoft-Original-Message-ID: <20200410200218.24992-1-michael.kubacki@outlook.com> X-TMN: [EdI4hYB4w5+bAjNxGzrAvcNdRAYsJMtuloJlk012Ye7q+liZo0g0jC/2SsqvYbgS] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: ea3cd37f-c495-483d-20c6-08d7dd8a1dae X-MS-TrafficTypeDiagnostic: MW2NAM12HT176: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6HY5lbquEykju1fa1UPg1t73RdSLBo8lIWzbMbduNxv6VXsIEFGIwkfpWBs/1CYWoy8BPRfyc20EvhlZzJuDVTMtqqiC6hpy05ZLY8Uza1bFiu05R3q7O5bf42wX+sm68tC+sqX2TT5/xeBecqopwwvJqrBMWAIZhn639qMVDMvqcU5nkEjGGFSukVUyzyWexLAlV/pobBt5MIytGIhAZgsJOHeWDznEAbtGInkEKQ8= 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: Sk2g2XTTi/5HlW+q4uFj04BUg+xkKG1hn7uYJPxhP0UZaYMheY9x107vYzAfR6/mRIPbjRA4cD3yuaKB5jFb/CXg7gZrdjmB1slE4xhJoGEtdAKXo27ARiVEL5eHAp2EvFCTxjpaIf6NMWN1qlannVwsk4Q8Bqy5YOVmYVNF2i1nTt0WVVmeWtEbsPlJSZ/11g3V1ItqV/75cXv/lk+fQg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea3cd37f-c495-483d-20c6-08d7dd8a1dae X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 20:02:37.0740 (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: MW2NAM12HT176 Content-Type: text/plain From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1959 V2 changes: * Add explicit dependency to EhciPei on BaseLib The macros EFI_LIST_FOR_EACH and EFI_LIST_FOR_EACH_SAFE have been duplicated across several drivers such as: * EhciPei * EhciDxe * HddPasswordDxe * RamDiskDxe * UfsPassThruDxe * XhciDxe These macros have proven useful and established a commonly used pattern for linked list iteration. This patch series consolidates the definitions to a single definition in BaseLib.h so they are maintained alongside other pre-existing generic linked list macros and functions. Note: Another commonly used generic linked list macro is EFI_LIST_CONTAINER. I'm considering consolidating that to BaseLib.h as well but that is not done in this patch series since it satisfies a separate use case than the iteration macros and the change can be made independently. On a separate note, shallow threading might not work on this patch series due to changes made by the SMTP server. Please bear with me while I am investigating if this can be changed. Cc: Chao Zhang Cc: Dandan Bi Cc: Hao A Wu Cc: Jian J Wang Cc: Liming Gao Cc: Michael D Kinney Cc: Ray Ni Cc: Sean Brogan Signed-off-by: Michael Kubacki Michael Kubacki (7): MdePkg/BaseLib: Add linked list iteration macros MdeModulePkg/EhciDxe: Use BaseLib linked list iteration macros MdeModulePkg/EhciPei: Use BaseLib linked list iteration macros MdeModulePkg/XhciDxe: Use BaseLib linked list iteration macros MdeModulePkg/UfsPassThruDxe: Use BaseLib linked list iteration macros MdeModulePkg/RamDiskDxe: Use BaseLib linked list iteration macros SecurityPkg/HddPassword: Use BaseLib linked list iteration macros MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c | 3 ++- MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c | 11 ++++---- MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c | 5 ++-- MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 3 ++- MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 5 ++-- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 9 ++++--- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 3 ++- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 3 ++- MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDriver.c | 3 ++- MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.c | 9 ++++--- MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c | 5 ++-- SecurityPkg/HddPassword/HddPasswordDxe.c | 13 +++++----- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h | 15 +---------- MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h | 16 ++---------- MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf | 2 ++ MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h | 9 +------ MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h | 9 +------ MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.h | 15 +---------- MdePkg/Include/Library/BaseLib.h | 27 ++++++++++++++++++++ SecurityPkg/HddPassword/HddPasswordDxe.h | 7 +---- 20 files changed, 78 insertions(+), 94 deletions(-) -- 2.16.3.windows.1