[edk2,edk2-staging,17/20] IntelUndiPkg/XGigUndiDxe: drop unused variables

Message ID 20181115023353.20159-18-ard.biesheuvel@linaro.org
State New
Headers show
Series
  • IntelUndiPkg/XGigUndiDxe: fix GCC / ARM build issues
Related show

Commit Message

Ard Biesheuvel Nov. 15, 2018, 2:33 a.m.
Drop some variables that are defined, assigned but never referenced.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 IntelUndiPkg/XGigUndiDxe/Decode.c         | 3 ---
 IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c | 4 ----
 IntelUndiPkg/XGigUndiDxe/Xgbe.c           | 2 --
 3 files changed, 9 deletions(-)

-- 
2.17.1

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

Comments

Ryszard Knop Jan. 30, 2019, 4:39 p.m. | #1
Reviewed-by: Ryszard Knop <ryszard.knop@linux.intel.com>


On Wed, 2018-11-14 at 18:33 -0800, ard.biesheuvela wrote:
> Drop some variables that are defined, assigned but never referenced.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>

> ---

>  IntelUndiPkg/XGigUndiDxe/Decode.c         | 3 ---

>  IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c | 4 ----

>  IntelUndiPkg/XGigUndiDxe/Xgbe.c           | 2 --

>  3 files changed, 9 deletions(-)

> 

> diff --git a/IntelUndiPkg/XGigUndiDxe/Decode.c

> b/IntelUndiPkg/XGigUndiDxe/Decode.c

> index 5f37ce254872..c8dc3f4eb659 100644

> --- a/IntelUndiPkg/XGigUndiDxe/Decode.c

> +++ b/IntelUndiPkg/XGigUndiDxe/Decode.c

> @@ -1454,14 +1454,11 @@ UndiStatus (

>    )

>  {

>    PXE_DB_GET_STATUS *          DbPtr;

> -  UINT16                       i;

>    UINT32                       IntStatus;

>    UINT16                       NumEntries;

>    struct ixgbe_legacy_rx_desc *RxPtr;

>    bool                         LinkUp;

>  

> -  i = 0;

> -

>    if (XgbeAdapter->DriverBusy) {

>    

>      //DEBUGPRINT (CRITICAL, ("ERROR: UndiStatus called when driver

> busy\n"));

> diff --git a/IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c

> b/IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c

> index 2aacb63ca158..df5238a3b55a 100644

> --- a/IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c

> +++ b/IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c

> @@ -197,7 +197,6 @@ GetNextRequestElement (

>    )

>  {

>    EFI_STRING StringPtr;

> -  EFI_STRING TmpPtr;

>    EFI_STATUS Status;

>    UINTN      Length;

>    UINT8 *    TmpBuffer;

> @@ -226,9 +225,6 @@ GetNextRequestElement (

>      return NULL;

>    }

>  

> -  // Back up the header of one <BlockName>

> -  TmpPtr = StringPtr;

> -

>    StringPtr += StrLen (L"OFFSET=");

>  

>    // Get Offset

> diff --git a/IntelUndiPkg/XGigUndiDxe/Xgbe.c

> b/IntelUndiPkg/XGigUndiDxe/Xgbe.c

> index 6769f2dc72ab..b3dbbd2b1d08 100644

> --- a/IntelUndiPkg/XGigUndiDxe/Xgbe.c

> +++ b/IntelUndiPkg/XGigUndiDxe/Xgbe.c

> @@ -1399,12 +1399,10 @@ XgbeInitialize (

>    XGBE_DRIVER_DATA *XgbeAdapter

>    )

>  {

> -  UINT32 *     TempBar;

>    PXE_STATCODE PxeStatcode;

>    EFI_STATUS   Status;

>  

>    PxeStatcode = PXE_STATCODE_SUCCESS;

> -  TempBar     = NULL;

>  

>    ZeroMem (

>      (VOID *)(UINTN)XgbeAdapter->RxRing.UnmappedAddress,


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

Patch

diff --git a/IntelUndiPkg/XGigUndiDxe/Decode.c b/IntelUndiPkg/XGigUndiDxe/Decode.c
index 5f37ce254872..c8dc3f4eb659 100644
--- a/IntelUndiPkg/XGigUndiDxe/Decode.c
+++ b/IntelUndiPkg/XGigUndiDxe/Decode.c
@@ -1454,14 +1454,11 @@  UndiStatus (
   )
 {
   PXE_DB_GET_STATUS *          DbPtr;
-  UINT16                       i;
   UINT32                       IntStatus;
   UINT16                       NumEntries;
   struct ixgbe_legacy_rx_desc *RxPtr;
   bool                         LinkUp;
 
-  i = 0;
-
   if (XgbeAdapter->DriverBusy) {
   
     //DEBUGPRINT (CRITICAL, ("ERROR: UndiStatus called when driver busy\n"));
diff --git a/IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c b/IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c
index 2aacb63ca158..df5238a3b55a 100644
--- a/IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c
+++ b/IntelUndiPkg/XGigUndiDxe/HiiInternalLib.c
@@ -197,7 +197,6 @@  GetNextRequestElement (
   )
 {
   EFI_STRING StringPtr;
-  EFI_STRING TmpPtr;
   EFI_STATUS Status;
   UINTN      Length;
   UINT8 *    TmpBuffer;
@@ -226,9 +225,6 @@  GetNextRequestElement (
     return NULL;
   }
 
-  // Back up the header of one <BlockName>
-  TmpPtr = StringPtr;
-
   StringPtr += StrLen (L"OFFSET=");
 
   // Get Offset
diff --git a/IntelUndiPkg/XGigUndiDxe/Xgbe.c b/IntelUndiPkg/XGigUndiDxe/Xgbe.c
index 6769f2dc72ab..b3dbbd2b1d08 100644
--- a/IntelUndiPkg/XGigUndiDxe/Xgbe.c
+++ b/IntelUndiPkg/XGigUndiDxe/Xgbe.c
@@ -1399,12 +1399,10 @@  XgbeInitialize (
   XGBE_DRIVER_DATA *XgbeAdapter
   )
 {
-  UINT32 *     TempBar;
   PXE_STATCODE PxeStatcode;
   EFI_STATUS   Status;
 
   PxeStatcode = PXE_STATCODE_SUCCESS;
-  TempBar     = NULL;
 
   ZeroMem (
     (VOID *)(UINTN)XgbeAdapter->RxRing.UnmappedAddress,