[edk2] [PATCH 02/26] MdeModulePkg UiApp: Remove redundant functions

shenglei posted 26 patches 6 years, 9 months ago
There is a newer version of this series
[edk2] [PATCH 02/26] MdeModulePkg UiApp: Remove redundant functions
Posted by shenglei 6 years, 9 months ago
The functions that are never called have been removed.
They are EnableResetReminderFeature,DisableResetRemin-
derFeature and DisableResetRequired.
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>
---
 MdeModulePkg/Application/UiApp/FrontPage.c | 40 ----------------------
 MdeModulePkg/Application/UiApp/Ui.h        | 30 ----------------
 2 files changed, 70 deletions(-)

diff --git a/MdeModulePkg/Application/UiApp/FrontPage.c b/MdeModulePkg/Application/UiApp/FrontPage.c
index 2403aad9d9..f0513deb51 100644
--- a/MdeModulePkg/Application/UiApp/FrontPage.c
+++ b/MdeModulePkg/Application/UiApp/FrontPage.c
@@ -1042,34 +1042,7 @@ UiEntry (
 //
 
 
-/**
-  Enable the setup browser reset reminder feature.
-  This routine is used in platform tip. If the platform policy need the feature, use the routine to enable it.
 
-**/
-VOID
-EFIAPI
-EnableResetReminderFeature (
-  VOID
-  )
-{
-  mFeaturerSwitch = TRUE;
-}
-
-
-/**
-  Disable the setup browser reset reminder feature.
-  This routine is used in platform tip. If the platform policy do not want the feature, use the routine to disable it.
-
-**/
-VOID
-EFIAPI
-DisableResetReminderFeature (
-  VOID
-  )
-{
-  mFeaturerSwitch = FALSE;
-}
 
 
 /**
@@ -1087,19 +1060,6 @@ EnableResetRequired (
 }
 
 
-/**
-  Record the info that  no reset is required.
-  A  module boolean variable is used to record whether a reset is required.
-
-**/
-VOID
-EFIAPI
-DisableResetRequired (
-  VOID
-  )
-{
-  mResetRequired = FALSE;
-}
 
 
 /**
diff --git a/MdeModulePkg/Application/UiApp/Ui.h b/MdeModulePkg/Application/UiApp/Ui.h
index a9c30b0c56..7be164570c 100644
--- a/MdeModulePkg/Application/UiApp/Ui.h
+++ b/MdeModulePkg/Application/UiApp/Ui.h
@@ -53,27 +53,7 @@ typedef struct {
 //
 //The interface functions related to the Setup Browser Reset Reminder feature
 //
-/**
-  Enable the setup browser reset reminder feature.
-  This routine is used in a platform tip. If the platform policy needs the feature, use the routine to enable it.
 
-**/
-VOID
-EFIAPI
-EnableResetReminderFeature (
-  VOID
-  );
-
-/**
-  Disable the setup browser reset reminder feature.
-  This routine is used in a platform tip. If the platform policy does not want the feature, use the routine to disable it.
-
-**/
-VOID
-EFIAPI
-DisableResetReminderFeature (
-  VOID
-  );
 
 /**
   Record the info that a reset is required.
@@ -87,16 +67,6 @@ EnableResetRequired (
   );
 
 
-/**
-  Record the info that no reset is required.
-  A module boolean variable is used to record whether a reset is required.
-
-**/
-VOID
-EFIAPI
-DisableResetRequired (
-  VOID
-  );
 
 /**
   Check whether platform policy enables the reset reminder feature. The default is enabled.
-- 
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 02/26] MdeModulePkg UiApp: Remove redundant functions
Posted by Laszlo Ersek 6 years, 9 months ago
On 08/08/18 10:46, shenglei wrote:
> The functions that are never called have been removed.
> They are EnableResetReminderFeature,DisableResetRemin-
> derFeature and DisableResetRequired.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1062

Please don't split the function names with hyphens.

Looks good to me otherwise.

The next logical step for UiApp is to remove the
IsResetReminderFeatureEnable() function, the "mFeaturerSwitch" variable,
and replace all client sites with constant TRUE (and simplify the
resultant code).

With the commit message updated:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo

> 
> 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>
> ---
>  MdeModulePkg/Application/UiApp/FrontPage.c | 40 ----------------------
>  MdeModulePkg/Application/UiApp/Ui.h        | 30 ----------------
>  2 files changed, 70 deletions(-)
> 
> diff --git a/MdeModulePkg/Application/UiApp/FrontPage.c b/MdeModulePkg/Application/UiApp/FrontPage.c
> index 2403aad9d9..f0513deb51 100644
> --- a/MdeModulePkg/Application/UiApp/FrontPage.c
> +++ b/MdeModulePkg/Application/UiApp/FrontPage.c
> @@ -1042,34 +1042,7 @@ UiEntry (
>  //
>  
>  
> -/**
> -  Enable the setup browser reset reminder feature.
> -  This routine is used in platform tip. If the platform policy need the feature, use the routine to enable it.
>  
> -**/
> -VOID
> -EFIAPI
> -EnableResetReminderFeature (
> -  VOID
> -  )
> -{
> -  mFeaturerSwitch = TRUE;
> -}
> -
> -
> -/**
> -  Disable the setup browser reset reminder feature.
> -  This routine is used in platform tip. If the platform policy do not want the feature, use the routine to disable it.
> -
> -**/
> -VOID
> -EFIAPI
> -DisableResetReminderFeature (
> -  VOID
> -  )
> -{
> -  mFeaturerSwitch = FALSE;
> -}
>  
>  
>  /**
> @@ -1087,19 +1060,6 @@ EnableResetRequired (
>  }
>  
>  
> -/**
> -  Record the info that  no reset is required.
> -  A  module boolean variable is used to record whether a reset is required.
> -
> -**/
> -VOID
> -EFIAPI
> -DisableResetRequired (
> -  VOID
> -  )
> -{
> -  mResetRequired = FALSE;
> -}
>  
>  
>  /**
> diff --git a/MdeModulePkg/Application/UiApp/Ui.h b/MdeModulePkg/Application/UiApp/Ui.h
> index a9c30b0c56..7be164570c 100644
> --- a/MdeModulePkg/Application/UiApp/Ui.h
> +++ b/MdeModulePkg/Application/UiApp/Ui.h
> @@ -53,27 +53,7 @@ typedef struct {
>  //
>  //The interface functions related to the Setup Browser Reset Reminder feature
>  //
> -/**
> -  Enable the setup browser reset reminder feature.
> -  This routine is used in a platform tip. If the platform policy needs the feature, use the routine to enable it.
>  
> -**/
> -VOID
> -EFIAPI
> -EnableResetReminderFeature (
> -  VOID
> -  );
> -
> -/**
> -  Disable the setup browser reset reminder feature.
> -  This routine is used in a platform tip. If the platform policy does not want the feature, use the routine to disable it.
> -
> -**/
> -VOID
> -EFIAPI
> -DisableResetReminderFeature (
> -  VOID
> -  );
>  
>  /**
>    Record the info that a reset is required.
> @@ -87,16 +67,6 @@ EnableResetRequired (
>    );
>  
>  
> -/**
> -  Record the info that no reset is required.
> -  A module boolean variable is used to record whether a reset is required.
> -
> -**/
> -VOID
> -EFIAPI
> -DisableResetRequired (
> -  VOID
> -  );
>  
>  /**
>    Check whether platform policy enables the reset reminder feature. The default is enabled.
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 02/26] MdeModulePkg UiApp: Remove redundant functions
Posted by Zeng, Star 6 years, 9 months ago
I agree with Laszlo. Reviewed-by: Star Zeng <star.zeng@intel.com>.


Thanks,
Star
-----Original Message-----
From: Laszlo Ersek [mailto:lersek@redhat.com] 
Sent: Thursday, August 9, 2018 2:07 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 02/26] MdeModulePkg UiApp: Remove redundant functions

On 08/08/18 10:46, shenglei wrote:
> The functions that are never called have been removed.
> They are EnableResetReminderFeature,DisableResetRemin-
> derFeature and DisableResetRequired.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1062

Please don't split the function names with hyphens.

Looks good to me otherwise.

The next logical step for UiApp is to remove the
IsResetReminderFeatureEnable() function, the "mFeaturerSwitch" variable, and replace all client sites with constant TRUE (and simplify the resultant code).

With the commit message updated:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo

> 
> 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>
> ---
>  MdeModulePkg/Application/UiApp/FrontPage.c | 40 ----------------------
>  MdeModulePkg/Application/UiApp/Ui.h        | 30 ----------------
>  2 files changed, 70 deletions(-)
> 
> diff --git a/MdeModulePkg/Application/UiApp/FrontPage.c 
> b/MdeModulePkg/Application/UiApp/FrontPage.c
> index 2403aad9d9..f0513deb51 100644
> --- a/MdeModulePkg/Application/UiApp/FrontPage.c
> +++ b/MdeModulePkg/Application/UiApp/FrontPage.c
> @@ -1042,34 +1042,7 @@ UiEntry (
>  //
>  
>  
> -/**
> -  Enable the setup browser reset reminder feature.
> -  This routine is used in platform tip. If the platform policy need the feature, use the routine to enable it.
>  
> -**/
> -VOID
> -EFIAPI
> -EnableResetReminderFeature (
> -  VOID
> -  )
> -{
> -  mFeaturerSwitch = TRUE;
> -}
> -
> -
> -/**
> -  Disable the setup browser reset reminder feature.
> -  This routine is used in platform tip. If the platform policy do not want the feature, use the routine to disable it.
> -
> -**/
> -VOID
> -EFIAPI
> -DisableResetReminderFeature (
> -  VOID
> -  )
> -{
> -  mFeaturerSwitch = FALSE;
> -}
>  
>  
>  /**
> @@ -1087,19 +1060,6 @@ EnableResetRequired (  }
>  
>  
> -/**
> -  Record the info that  no reset is required.
> -  A  module boolean variable is used to record whether a reset is required.
> -
> -**/
> -VOID
> -EFIAPI
> -DisableResetRequired (
> -  VOID
> -  )
> -{
> -  mResetRequired = FALSE;
> -}
>  
>  
>  /**
> diff --git a/MdeModulePkg/Application/UiApp/Ui.h 
> b/MdeModulePkg/Application/UiApp/Ui.h
> index a9c30b0c56..7be164570c 100644
> --- a/MdeModulePkg/Application/UiApp/Ui.h
> +++ b/MdeModulePkg/Application/UiApp/Ui.h
> @@ -53,27 +53,7 @@ typedef struct {
>  //
>  //The interface functions related to the Setup Browser Reset Reminder 
> feature  //
> -/**
> -  Enable the setup browser reset reminder feature.
> -  This routine is used in a platform tip. If the platform policy needs the feature, use the routine to enable it.
>  
> -**/
> -VOID
> -EFIAPI
> -EnableResetReminderFeature (
> -  VOID
> -  );
> -
> -/**
> -  Disable the setup browser reset reminder feature.
> -  This routine is used in a platform tip. If the platform policy does not want the feature, use the routine to disable it.
> -
> -**/
> -VOID
> -EFIAPI
> -DisableResetReminderFeature (
> -  VOID
> -  );
>  
>  /**
>    Record the info that a reset is required.
> @@ -87,16 +67,6 @@ EnableResetRequired (
>    );
>  
>  
> -/**
> -  Record the info that no reset is required.
> -  A module boolean variable is used to record whether a reset is required.
> -
> -**/
> -VOID
> -EFIAPI
> -DisableResetRequired (
> -  VOID
> -  );
>  
>  /**
>    Check whether platform policy enables the reset reminder feature. The default is enabled.
> 

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