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

shenglei posted 26 patches 6 years, 9 months ago
There is a newer version of this series
[edk2] [PATCH 26/26] MdeModulePkg SetupBrowserDxe: Remove a redundant function
Posted by shenglei 6 years, 9 months ago
The function IsDevicePathExist that is never called
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>
---
 .../Universal/SetupBrowserDxe/IfrParse.c      | 33 -------------------
 1 file changed, 33 deletions(-)

diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
index 3d28e7aa50..042bd4b30d 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
@@ -452,39 +452,6 @@ IntializeBrowserStorage (
   }
 }
 
-/**
-  Check whether exist device path info in the ConfigHdr string.
-
-  @param  String                 UEFI configuration string
-
-  @retval TRUE                   Device Path exist.
-  @retval FALSE                  Not exist device path info.
-
-**/
-BOOLEAN
-IsDevicePathExist (
-  IN  EFI_STRING                   String
-  )
-{
-  UINTN                    Length;
-
-  for (; (*String != 0 && StrnCmp (String, L"PATH=", StrLen (L"PATH=")) != 0); String++);
-  if (*String == 0) {
-    return FALSE;
-  }
-
-  String += StrLen (L"PATH=");
-  if (*String == 0) {
-    return FALSE;
-  }
-
-  for (Length = 0; *String != 0 && *String != L'&'; String++, Length++);
-  if (((Length + 1) / 2) < sizeof (EFI_DEVICE_PATH_PROTOCOL)) {
-    return FALSE;
-  }
-
-  return TRUE;
-}
 
 /**
   Allocate a FORMSET_STORAGE data structure and insert to FormSet Storage List.
-- 
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 26/26] MdeModulePkg SetupBrowserDxe: Remove a redundant function
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 26/26] MdeModulePkg SetupBrowserDxe: Remove a redundant function

The function IsDevicePathExist that is never called 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>
---
 .../Universal/SetupBrowserDxe/IfrParse.c      | 33 -------------------
 1 file changed, 33 deletions(-)

diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
index 3d28e7aa50..042bd4b30d 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
@@ -452,39 +452,6 @@ IntializeBrowserStorage (
   }
 }
 
-/**
-  Check whether exist device path info in the ConfigHdr string.
-
-  @param  String                 UEFI configuration string
-
-  @retval TRUE                   Device Path exist.
-  @retval FALSE                  Not exist device path info.
-
-**/
-BOOLEAN
-IsDevicePathExist (
-  IN  EFI_STRING                   String
-  )
-{
-  UINTN                    Length;
-
-  for (; (*String != 0 && StrnCmp (String, L"PATH=", StrLen (L"PATH=")) != 0); String++);
-  if (*String == 0) {
-    return FALSE;
-  }
-
-  String += StrLen (L"PATH=");
-  if (*String == 0) {
-    return FALSE;
-  }
-
-  for (Length = 0; *String != 0 && *String != L'&'; String++, Length++);
-  if (((Length + 1) / 2) < sizeof (EFI_DEVICE_PATH_PROTOCOL)) {
-    return FALSE;
-  }
-
-  return TRUE;
-}
 
 /**
   Allocate a FORMSET_STORAGE data structure and insert to FormSet Storage List.
--
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 26/26] MdeModulePkg SetupBrowserDxe: Remove a redundant function
Posted by Laszlo Ersek 6 years, 9 months ago
On 08/08/18 10:47, shenglei wrote:
> The function IsDevicePathExist that is never called
> 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>
> ---
>  .../Universal/SetupBrowserDxe/IfrParse.c      | 33 -------------------
>  1 file changed, 33 deletions(-)

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

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