[edk2] [PATCH 19/26] MdeModulePkg EmmcBlockIoPei: Remove a redundant function

shenglei posted 26 patches 6 years, 9 months ago
There is a newer version of this series
[edk2] [PATCH 19/26] MdeModulePkg EmmcBlockIoPei: Remove a redundant function
Posted by shenglei 6 years, 9 months ago
The function EmmcPeimUnlinkMemBlock that is never calld
has been removed.
https://bugzilla.tianocore.org/show_bug.cgi?id=1062

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei <shenglei.zhang@intel.com>
---
 .../Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c         | 24 -------------------
 1 file changed, 24 deletions(-)

diff --git a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
index a6f188f385..217736c1a6 100644
--- a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
+++ b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
@@ -219,31 +219,7 @@ EmmcPeimIsMemBlockEmpty (
   return TRUE;
 }
 
-/**
-  Unlink the memory block from the pool's list.
-
-  @param  Head           The block list head of the memory's pool.
-  @param  BlockToUnlink  The memory block to unlink.
 
-**/
-VOID
-EmmcPeimUnlinkMemBlock (
-  IN EMMC_PEIM_MEM_BLOCK      *Head,
-  IN EMMC_PEIM_MEM_BLOCK      *BlockToUnlink
-  )
-{
-  EMMC_PEIM_MEM_BLOCK         *Block;
-
-  ASSERT ((Head != NULL) && (BlockToUnlink != NULL));
-
-  for (Block = Head; Block != NULL; Block = Block->Next) {
-    if (Block->Next == BlockToUnlink) {
-      Block->Next         = BlockToUnlink->Next;
-      BlockToUnlink->Next = NULL;
-      break;
-    }
-  }
-}
 
 /**
   Initialize the memory management pool for the host controller.
-- 
2.18.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 19/26] MdeModulePkg EmmcBlockIoPei: Remove a redundant function
Posted by Wu, Hao A 6 years, 9 months ago
One minor comment:

Please help to remove the comment that mentioned 'EmmcPeimUnlinkMemBlock'
within function EmmcPeimFreeMemPool().

For me,
  //
  // Unlink all the memory blocks from the pool, then free them.
  //
will be fine.

With that change,
Reviewed-by: Hao Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> shenglei
> Sent: Wednesday, August 08, 2018 4:47 PM
> To: edk2-devel@lists.01.org
> Cc: Dong, Eric; Zeng, Star
> Subject: [edk2] [PATCH 19/26] MdeModulePkg EmmcBlockIoPei: Remove a
> redundant function
> 
> The function EmmcPeimUnlinkMemBlock that is never calld
> has been removed.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1062
> 
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: shenglei <shenglei.zhang@intel.com>
> ---
>  .../Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c         | 24 -------------------
>  1 file changed, 24 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
> b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
> index a6f188f385..217736c1a6 100644
> --- a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
> +++ b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
> @@ -219,31 +219,7 @@ EmmcPeimIsMemBlockEmpty (
>    return TRUE;
>  }
> 
> -/**
> -  Unlink the memory block from the pool's list.
> -
> -  @param  Head           The block list head of the memory's pool.
> -  @param  BlockToUnlink  The memory block to unlink.
> 
> -**/
> -VOID
> -EmmcPeimUnlinkMemBlock (
> -  IN EMMC_PEIM_MEM_BLOCK      *Head,
> -  IN EMMC_PEIM_MEM_BLOCK      *BlockToUnlink
> -  )
> -{
> -  EMMC_PEIM_MEM_BLOCK         *Block;
> -
> -  ASSERT ((Head != NULL) && (BlockToUnlink != NULL));
> -
> -  for (Block = Head; Block != NULL; Block = Block->Next) {
> -    if (Block->Next == BlockToUnlink) {
> -      Block->Next         = BlockToUnlink->Next;
> -      BlockToUnlink->Next = NULL;
> -      break;
> -    }
> -  }
> -}
> 
>  /**
>    Initialize the memory management pool for the host controller.
> --
> 2.18.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 19/26] MdeModulePkg EmmcBlockIoPei: Remove a redundant function
Posted by Zeng, Star 6 years, 9 months ago
I agree with Hao.
And there is a typo in commit log. 'calld' should be 'called'.

With the typo fixed, Reviewed-by: Star Zeng <star.zeng@intel.com>


Thanks,
Star
-----Original Message-----
From: Wu, Hao A 
Sent: Friday, August 10, 2018 10:58 AM
To: Zhang, Shenglei <shenglei.zhang@intel.com>; edk2-devel@lists.01.org
Cc: Dong, Eric <eric.dong@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: RE: [edk2] [PATCH 19/26] MdeModulePkg EmmcBlockIoPei: Remove a redundant function

One minor comment:

Please help to remove the comment that mentioned 'EmmcPeimUnlinkMemBlock'
within function EmmcPeimFreeMemPool().

For me,
  //
  // Unlink all the memory blocks from the pool, then free them.
  //
will be fine.

With that change,
Reviewed-by: Hao Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of 
> shenglei
> Sent: Wednesday, August 08, 2018 4:47 PM
> To: edk2-devel@lists.01.org
> Cc: Dong, Eric; Zeng, Star
> Subject: [edk2] [PATCH 19/26] MdeModulePkg EmmcBlockIoPei: Remove a 
> redundant function
> 
> The function EmmcPeimUnlinkMemBlock that is never calld has been 
> removed.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1062
> 
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: shenglei <shenglei.zhang@intel.com>
> ---
>  .../Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c         | 24 -------------------
>  1 file changed, 24 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
> b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
> index a6f188f385..217736c1a6 100644
> --- a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
> +++ b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c
> @@ -219,31 +219,7 @@ EmmcPeimIsMemBlockEmpty (
>    return TRUE;
>  }
> 
> -/**
> -  Unlink the memory block from the pool's list.
> -
> -  @param  Head           The block list head of the memory's pool.
> -  @param  BlockToUnlink  The memory block to unlink.
> 
> -**/
> -VOID
> -EmmcPeimUnlinkMemBlock (
> -  IN EMMC_PEIM_MEM_BLOCK      *Head,
> -  IN EMMC_PEIM_MEM_BLOCK      *BlockToUnlink
> -  )
> -{
> -  EMMC_PEIM_MEM_BLOCK         *Block;
> -
> -  ASSERT ((Head != NULL) && (BlockToUnlink != NULL));
> -
> -  for (Block = Head; Block != NULL; Block = Block->Next) {
> -    if (Block->Next == BlockToUnlink) {
> -      Block->Next         = BlockToUnlink->Next;
> -      BlockToUnlink->Next = NULL;
> -      break;
> -    }
> -  }
> -}
> 
>  /**
>    Initialize the memory management pool for the host controller.
> --
> 2.18.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel