[edk2] [PATCH 12/26] MdeModulePkg UfsPassThruDxe: Remove redundant functions

shenglei posted 26 patches 6 years, 9 months ago
There is a newer version of this series
[edk2] [PATCH 12/26] MdeModulePkg UfsPassThruDxe: Remove redundant functions
Posted by shenglei 6 years, 9 months ago
The functions that are never called have been removed.
They are UfsClearFlag and UfsFindAvailableSlotInTmrl.
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/Ufs/UfsPassThruDxe/UfsPassThruHci.c   | 49 -------------------
 1 file changed, 49 deletions(-)

diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
index e868c8c07e..5756f637fd 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
@@ -753,31 +753,6 @@ UfsFindAvailableSlotInTrl (
   return EFI_NOT_READY;
 }
 
-/**
-  Find out available slot in task management transfer list of a UFS device.
-
-  @param[in]  Private       The pointer to the UFS_PASS_THRU_PRIVATE_DATA data structure.
-  @param[out] Slot          The available slot.
-
-  @retval EFI_SUCCESS       The available slot was found successfully.
-
-**/
-EFI_STATUS
-UfsFindAvailableSlotInTmrl (
-  IN     UFS_PASS_THRU_PRIVATE_DATA   *Private,
-     OUT UINT8                        *Slot
-  )
-{
-  ASSERT ((Private != NULL) && (Slot != NULL));
-
-  //
-  // The simplest algo to always use slot 0.
-  // TODO: enhance it to support async transfer with multiple slot.
-  //
-  *Slot = 0;
-
-  return EFI_SUCCESS;
-}
 
 /**
   Start specified slot in transfer list of a UFS device.
@@ -1229,31 +1204,7 @@ UfsSetFlag (
   return Status;
 }
 
-/**
-  Clear specified flag to 0 on a UFS device.
-
-  @param[in]  Private           The pointer to the UFS_PASS_THRU_PRIVATE_DATA data structure.
-  @param[in]  FlagId            The ID of flag to be cleared.
-
-  @retval EFI_SUCCESS           The flag was cleared successfully.
-  @retval EFI_DEVICE_ERROR      A device error occurred while attempting to clear the flag.
-  @retval EFI_TIMEOUT           A timeout occurred while waiting for the completion of clearing the flag.
-
-**/
-EFI_STATUS
-UfsClearFlag (
-  IN  UFS_PASS_THRU_PRIVATE_DATA   *Private,
-  IN  UINT8                        FlagId
-  )
-{
-  EFI_STATUS             Status;
-  UINT8                  Value;
-
-  Value  = 0;
-  Status = UfsRwFlags (Private, FALSE, FlagId, &Value);
 
-  return Status;
-}
 
 /**
   Read specified flag from a UFS device.
-- 
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 12/26] MdeModulePkg UfsPassThruDxe: Remove redundant functions
Posted by Wu, Hao A 6 years, 9 months ago
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 12/26] MdeModulePkg UfsPassThruDxe: Remove
> redundant functions
> 
> The functions that are never called have been removed.
> They are UfsClearFlag and UfsFindAvailableSlotInTmrl.
> 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/Ufs/UfsPassThruDxe/UfsPassThruHci.c   | 49 -------------------
>  1 file changed, 49 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
> b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
> index e868c8c07e..5756f637fd 100644
> --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
> +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
> @@ -753,31 +753,6 @@ UfsFindAvailableSlotInTrl (
>    return EFI_NOT_READY;
>  }
> 
> -/**
> -  Find out available slot in task management transfer list of a UFS device.
> -
> -  @param[in]  Private       The pointer to the UFS_PASS_THRU_PRIVATE_DATA
> data structure.
> -  @param[out] Slot          The available slot.
> -
> -  @retval EFI_SUCCESS       The available slot was found successfully.
> -
> -**/
> -EFI_STATUS
> -UfsFindAvailableSlotInTmrl (
> -  IN     UFS_PASS_THRU_PRIVATE_DATA   *Private,
> -     OUT UINT8                        *Slot
> -  )
> -{
> -  ASSERT ((Private != NULL) && (Slot != NULL));
> -
> -  //
> -  // The simplest algo to always use slot 0.
> -  // TODO: enhance it to support async transfer with multiple slot.
> -  //
> -  *Slot = 0;
> -
> -  return EFI_SUCCESS;
> -}
> 
>  /**
>    Start specified slot in transfer list of a UFS device.
> @@ -1229,31 +1204,7 @@ UfsSetFlag (
>    return Status;
>  }
> 
> -/**
> -  Clear specified flag to 0 on a UFS device.
> -
> -  @param[in]  Private           The pointer to the
> UFS_PASS_THRU_PRIVATE_DATA data structure.
> -  @param[in]  FlagId            The ID of flag to be cleared.
> -
> -  @retval EFI_SUCCESS           The flag was cleared successfully.
> -  @retval EFI_DEVICE_ERROR      A device error occurred while attempting to
> clear the flag.
> -  @retval EFI_TIMEOUT           A timeout occurred while waiting for the
> completion of clearing the flag.
> -
> -**/
> -EFI_STATUS
> -UfsClearFlag (
> -  IN  UFS_PASS_THRU_PRIVATE_DATA   *Private,
> -  IN  UINT8                        FlagId
> -  )
> -{
> -  EFI_STATUS             Status;
> -  UINT8                  Value;
> -
> -  Value  = 0;
> -  Status = UfsRwFlags (Private, FALSE, FlagId, &Value);
> 
> -  return Status;
> -}
> 
>  /**
>    Read specified flag from a UFS device.
> --
> 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 12/26] MdeModulePkg UfsPassThruDxe: Remove redundant functions
Posted by Zeng, Star 6 years, 9 months ago
Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: Zhang, Shenglei 
Sent: Wednesday, August 8, 2018 4:47 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: [PATCH 12/26] MdeModulePkg UfsPassThruDxe: Remove redundant functions

The functions that are never called have been removed.
They are UfsClearFlag and UfsFindAvailableSlotInTmrl.
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/Ufs/UfsPassThruDxe/UfsPassThruHci.c   | 49 -------------------
 1 file changed, 49 deletions(-)

diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
index e868c8c07e..5756f637fd 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
@@ -753,31 +753,6 @@ UfsFindAvailableSlotInTrl (
   return EFI_NOT_READY;
 }
 
-/**
-  Find out available slot in task management transfer list of a UFS device.
-
-  @param[in]  Private       The pointer to the UFS_PASS_THRU_PRIVATE_DATA data structure.
-  @param[out] Slot          The available slot.
-
-  @retval EFI_SUCCESS       The available slot was found successfully.
-
-**/
-EFI_STATUS
-UfsFindAvailableSlotInTmrl (
-  IN     UFS_PASS_THRU_PRIVATE_DATA   *Private,
-     OUT UINT8                        *Slot
-  )
-{
-  ASSERT ((Private != NULL) && (Slot != NULL));
-
-  //
-  // The simplest algo to always use slot 0.
-  // TODO: enhance it to support async transfer with multiple slot.
-  //
-  *Slot = 0;
-
-  return EFI_SUCCESS;
-}
 
 /**
   Start specified slot in transfer list of a UFS device.
@@ -1229,31 +1204,7 @@ UfsSetFlag (
   return Status;
 }
 
-/**
-  Clear specified flag to 0 on a UFS device.
-
-  @param[in]  Private           The pointer to the UFS_PASS_THRU_PRIVATE_DATA data structure.
-  @param[in]  FlagId            The ID of flag to be cleared.
-
-  @retval EFI_SUCCESS           The flag was cleared successfully.
-  @retval EFI_DEVICE_ERROR      A device error occurred while attempting to clear the flag.
-  @retval EFI_TIMEOUT           A timeout occurred while waiting for the completion of clearing the flag.
-
-**/
-EFI_STATUS
-UfsClearFlag (
-  IN  UFS_PASS_THRU_PRIVATE_DATA   *Private,
-  IN  UINT8                        FlagId
-  )
-{
-  EFI_STATUS             Status;
-  UINT8                  Value;
-
-  Value  = 0;
-  Status = UfsRwFlags (Private, FALSE, FlagId, &Value);
 
-  return Status;
-}
 
 /**
   Read specified flag from a UFS device.
-- 
2.18.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel