]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UfsPassThruDxe: Use BaseLib linked list iteration macros
authorMichael Kubacki <michael.kubacki@microsoft.com>
Fri, 10 Apr 2020 20:02:16 +0000 (04:02 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 21 Apr 2020 02:20:51 +0000 (02:20 +0000)
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 <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: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c

index 26c5a8b8555498d9fef8dab654e9058e45d41222..9768c2e6fb225dc73eb705bb3268d5f3a5f394eb 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
 \r
   Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) Microsoft Corporation.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -1083,7 +1084,7 @@ UfsPassThruDriverBindingStop (
   // Cleanup the resources of I/O requests in the async I/O queue\r
   //\r
   if (!IsListEmpty(&Private->Queue)) {\r
-    EFI_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) {\r
+    BASE_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) {\r
       TransReq  = UFS_PASS_THRU_TRANS_REQ_FROM_THIS (Entry);\r
 \r
       //\r
index cbc0c2126eee926ef8a11bb9613f8471c61ff161..ef33250c89d71ca84c7c986c7a9e5ee58eae2ca9 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
 \r
   Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) Microsoft Corporation.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -46,14 +47,6 @@ typedef struct {
   UINT16   Rsvd:4;\r
 } UFS_EXPOSED_LUNS;\r
 \r
-//\r
-// Iterate through the double linked list. This is delete-safe.\r
-// Do not touch NextEntry\r
-//\r
-#define EFI_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead)            \\r
-  for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\\r
-      Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink)\r
-\r
 typedef struct _UFS_PASS_THRU_PRIVATE_DATA {\r
   UINT32                              Signature;\r
   EFI_HANDLE                          Handle;\r
index 93ac958f658fb5e75c6a9f6b6d382ed3e33c4bd6..0b1030ab47888e8814c9bc816fe2881385b71b6b 100644 (file)
@@ -3,6 +3,7 @@
   for upper layer application to execute UFS-supported SCSI cmds.\r
 \r
   Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) Microsoft Corporation.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -2285,7 +2286,7 @@ ProcessAsyncTaskList (
   // Check the entries in the async I/O queue are done or not.\r
   //\r
   if (!IsListEmpty(&Private->Queue)) {\r
-    EFI_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) {\r
+    BASE_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) {\r
       TransReq  = UFS_PASS_THRU_TRANS_REQ_FROM_THIS (Entry);\r
       Packet    = TransReq->Packet;\r
 \r