mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 09:04:07 +02:00
MdeModulePkg/UfsPassThruDxe: Use BaseLib linked list iteration macros
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>
This commit is contained in:
parent
dc528558c9
commit
d189a3f9b6
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
|
Copyright (c) Microsoft Corporation.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
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
|
// Cleanup the resources of I/O requests in the async I/O queue
|
||||||
//
|
//
|
||||||
if (!IsListEmpty(&Private->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);
|
TransReq = UFS_PASS_THRU_TRANS_REQ_FROM_THIS (Entry);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
|
Copyright (c) Microsoft Corporation.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -46,14 +47,6 @@ typedef struct {
|
|||||||
UINT16 Rsvd:4;
|
UINT16 Rsvd:4;
|
||||||
} UFS_EXPOSED_LUNS;
|
} 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 {
|
typedef struct _UFS_PASS_THRU_PRIVATE_DATA {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
EFI_HANDLE Handle;
|
EFI_HANDLE Handle;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
for upper layer application to execute UFS-supported SCSI cmds.
|
for upper layer application to execute UFS-supported SCSI cmds.
|
||||||
|
|
||||||
Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
|
Copyright (c) Microsoft Corporation.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
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.
|
// Check the entries in the async I/O queue are done or not.
|
||||||
//
|
//
|
||||||
if (!IsListEmpty(&Private->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);
|
TransReq = UFS_PASS_THRU_TRANS_REQ_FROM_THIS (Entry);
|
||||||
Packet = TransReq->Packet;
|
Packet = TransReq->Packet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user