Browse Source

WhitleyOpenBoardPkg: Fix GCC unused variables that are set warnings

Fixed issues caused by variables initialized but not used.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Isaac Oram 1 year ago
parent
commit
4c9b69e590
37 changed files with 28 additions and 150 deletions
  1. 0 2
      Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/AcpiTablePcds.c
  2. 0 3
      Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/KtiEparam.c
  3. 1 2
      Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/AcpiTablePcds.c
  4. 3 5
      Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/IioBifurInit.c
  5. 0 2
      Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/KtiEparam.c
  6. 4 8
      Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.c
  7. 0 2
      Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatformHooks.c
  8. 1 6
      Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatformVTDHooks.c
  9. 0 6
      Platform/Intel/WhitleyOpenBoardPkg/Features/Pci/Dxe/PciHostBridge/PciRootBridgeIo.c
  10. 1 1
      Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/BuildOptions.dsc
  11. 1 3
      Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/AcpiTablePcds.c
  12. 0 3
      Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/IioBifurInit.c
  13. 0 3
      Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/KtiEparam.c
  14. 0 3
      Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLib.c
  15. 0 2
      Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibApic.c
  16. 0 4
      Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibDsdt.c
  17. 0 7
      Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibSlit.c
  18. 1 3
      Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibSsdt.c
  19. 0 10
      Platform/Intel/WhitleyOpenBoardPkg/Library/BoardInitLib/BoardInitPreMemLib.c
  20. 1 7
      Platform/Intel/WhitleyOpenBoardPkg/Library/MultiPlatSupportLib/MultiPlatSupportLib.c
  21. 2 4
      Platform/Intel/WhitleyOpenBoardPkg/Library/PeiPlatformHookLib/PeiPlatformHooklib.c
  22. 0 2
      Platform/Intel/WhitleyOpenBoardPkg/Library/PlatformCmosAccessLib/PlatformCmosAccessLib.c
  23. 1 7
      Platform/Intel/WhitleyOpenBoardPkg/Library/PlatformHooksLib/PlatformHooks.c
  24. 0 7
      Platform/Intel/WhitleyOpenBoardPkg/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.c
  25. 1 2
      Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c
  26. 2 2
      Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dec
  27. 0 10
      Platform/Intel/WhitleyOpenBoardPkg/Uba/CfgDb/Dxe/CfgDbDxe.c
  28. 0 5
      Platform/Intel/WhitleyOpenBoardPkg/Uba/CfgDb/Pei/CfgDbPei.c
  29. 0 2
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c
  30. 0 4
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c
  31. 1 3
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeCooperCityRP/Pei/AcpiTablePcds.c
  32. 1 3
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/AcpiTablePcds.c
  33. 3 5
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/IioBifurInit.c
  34. 0 2
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/KtiEparam.c
  35. 1 3
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/AcpiTablePcds.c
  36. 3 5
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/IioBifurInit.c
  37. 0 2
      Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/KtiEparam.c

+ 0 - 2
Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/AcpiTablePcds.c

@@ -27,7 +27,6 @@ TypeAowandaPlatformUpdateAcpiTablePcds (
   EFI_STATUS  Status;
 
   EFI_HOB_GUID_TYPE  *GuidHob;
-  EFI_PLATFORM_INFO  *PlatformInfo;
 
   DEBUG ((DEBUG_INFO, "Uba Callback: PlatformAowandaUpdateAcpiTablePcds entered\n"));
 
@@ -37,7 +36,6 @@ TypeAowandaPlatformUpdateAcpiTablePcds (
     return EFI_NOT_FOUND;
   }
 
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
   // #
   // #ACPI items
   // #

+ 0 - 3
Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/KtiEparam.c

@@ -65,7 +65,6 @@ TypeAowandaInstallKtiEparamData (
 {
   EFI_STATUS         Status;
   EFI_HOB_GUID_TYPE  *GuidHob;
-  EFI_PLATFORM_INFO  *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
@@ -73,8 +72,6 @@ TypeAowandaInstallKtiEparamData (
     return EFI_NOT_FOUND;
   }
 
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
-
   Status = UbaConfigPpi->AddData (
                                   UbaConfigPpi,
                                   &gPlatformKtiEparamUpdateDataGuid,

+ 1 - 2
Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/AcpiTablePcds.c

@@ -26,7 +26,6 @@ TypeBoardPortTemplatePlatformUpdateAcpiTablePcds (
   EFI_STATUS Status;
 
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   DEBUG ((DEBUG_INFO, "Uba Callback: PlatformUpdateAcpiTablePcds entered\n"));
 
@@ -35,7 +34,7 @@ TypeBoardPortTemplatePlatformUpdateAcpiTablePcds (
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
+
   //#
   //#ACPI items
   //#

+ 3 - 5
Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/IioBifurInit.c

@@ -182,11 +182,10 @@ TypeBoardPortTemplateIioPortBifurcationInit (
   IN UBA_CONFIG_DATABASE_PPI    *UbaConfigPpi
 )
 {
-  EFI_STATUS                         Status;
-  EFI_HOB_GUID_TYPE                  *GuidHob;
-  EFI_PLATFORM_INFO                  *PlatformInfo;
+  EFI_STATUS                            Status;
+  EFI_HOB_GUID_TYPE                     *GuidHob;
   PLATFORM_IIO_CONFIG_UPDATE_TABLE_EX   *PlatformIioInfoPtr;
-  UINTN                              PlatformIioInfoSize;
+  UINTN                                 PlatformIioInfoSize;
 
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
@@ -194,7 +193,6 @@ TypeBoardPortTemplateIioPortBifurcationInit (
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   //
   // This is config for ICX

+ 0 - 2
Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/KtiEparam.c

@@ -48,14 +48,12 @@ TypeBoardPortTemplateInstallKtiEparamData (
 {
   EFI_STATUS                            Status;
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   Status = UbaConfigPpi->AddData (
                                  UbaConfigPpi,

+ 4 - 8
Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.c

@@ -395,7 +395,6 @@ AcpiPlatformEarlyAcpiTablesInstall (
 {
   EFI_STATUS                    Status;
   EFI_STATUS                    AcpiStatus;
-  BOOLEAN                       Installed;
   EFI_ACPI_TABLE_PROTOCOL       *AcpiTable;
   EFI_FIRMWARE_VOLUME2_PROTOCOL  *FwVol;
   INTN                          Instance = 0;
@@ -435,7 +434,6 @@ AcpiPlatformEarlyAcpiTablesInstall (
     CurrentTable = NULL;
     TableVersion = EFI_ACPI_TABLE_VERSION_NONE;
     TableHandle = 0;
-    Installed = FALSE;
 
     Status = FwVol->ReadSection (
                       FwVol,
@@ -478,9 +476,9 @@ AcpiPlatformEarlyAcpiTablesInstall (
               //
               AcpiStatus = AcpiTable->InstallAcpiTable (AcpiTable, CurrentTable, CurrentTable->Length, &TableHandle);
               if (!EFI_ERROR (AcpiStatus)) {
-                Installed = TRUE;
+                ASSERT_EFI_ERROR (AcpiStatus);
+                return AcpiStatus;
               }
-              ASSERT_EFI_ERROR (AcpiStatus);
             }
           }
         }
@@ -541,7 +539,6 @@ PmSsdtEarlyAcpiTablesInstall (
 {
   EFI_STATUS                    Status;
   EFI_STATUS                    AcpiStatus;
-  BOOLEAN                       Installed;
   EFI_ACPI_TABLE_PROTOCOL       *AcpiTable;
   EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol;
   INTN                          Instance = 0;
@@ -581,7 +578,6 @@ PmSsdtEarlyAcpiTablesInstall (
     CurrentTable = NULL;
     TableVersion = EFI_ACPI_TABLE_VERSION_NONE;
     TableHandle = 0;
-    Installed = FALSE;
 
     Status = FwVol->ReadSection (
                       FwVol,
@@ -617,9 +613,9 @@ PmSsdtEarlyAcpiTablesInstall (
               //
               AcpiStatus = AcpiTable->InstallAcpiTable (AcpiTable, CurrentTable, CurrentTable->Length, &TableHandle);
               if (!EFI_ERROR (AcpiStatus)) {
-                Installed = TRUE;
+                ASSERT_EFI_ERROR (AcpiStatus);
+                return AcpiStatus;
               }
-              ASSERT_EFI_ERROR (AcpiStatus);
             }
           }
         }

+ 0 - 2
Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatformHooks.c

@@ -255,7 +255,6 @@ InstallXhciAcpiTable (
   VOID
   )
 {
-  EFI_HANDLE                    *HandleBuffer;
   EFI_STATUS                    Status;
   EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol;
   EFI_ACPI_COMMON_HEADER        *CurrentTable;
@@ -269,7 +268,6 @@ InstallXhciAcpiTable (
   UINT64                        *XhciAcpiTablePtr;
   UINT64                        TempOemTableId;
 
-  HandleBuffer  = 0;
   Instance      = 0;
   TableHandle   = 0;
   CurrentTable  = NULL;

+ 1 - 6
Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatformVTDHooks.c

@@ -716,7 +716,6 @@ BuildDRHDForStack (
   UINT8                       PortIndex;
   UINT8                       MaxPortNumberPerSocket;
   UINT8                       CBIndex;
-  UINT64                      VtdMmioExtCap;
   UINT32                      VtdBase;
   UINT32                      VidDid;
   DMAR_ATSR                   *pAtsr = NULL;
@@ -745,7 +744,6 @@ BuildDRHDForStack (
     return EFI_UNSUPPORTED;
   }
 
-  VtdMmioExtCap = *(volatile UINT64*)((UINTN)VtdBase + R_VTD_EXT_CAP_LOW);
   mDrhd.RegisterBase = VtdBase;
 
   DevIndex                      = 00;
@@ -882,7 +880,7 @@ ReportDmar (
   )
 {
   EFI_STATUS                      Status = EFI_SUCCESS;
-  UINT8                           SocketIndex, IioBusBase, Bus;
+  UINT8                           SocketIndex, Bus;
   UINT8                           Dev, Func;
   UINT8                           DevIndex;
   UINT8                           PciNodeIndex;
@@ -1067,7 +1065,6 @@ ReportDmar (
       ZeroMem (DevScope, MEMORY_SIZE * sizeof (DEVICE_SCOPE));
       ZeroMem (PciNode, MEMORY_SIZE * sizeof (PCI_NODE));
 
-      IioBusBase = mCpuCsrAccessVarPtr ->StackBus[SocketIndex][Stack]; // Stack 0
       mDrhd.Flags = 1;
 
       DEBUG ((DEBUG_INFO, "[ACPI](DMAR) InterruptRemap is %aabled (%d & %d)\n",
@@ -1191,8 +1188,6 @@ ReportDmar (
         continue;
       }
 
-      IioBusBase = mIioUds2->IioUdsPtr->PlatformData.IIO_resource[SocketIndex].BusBase;
-
       if (mIioUds2->IioUdsPtr->PlatformData.CpuQpiInfo[SocketIndex].PcieSegment >= MAX_SOCKET) {
         return EFI_INVALID_PARAMETER;
       }

+ 0 - 6
Platform/Intel/WhitleyOpenBoardPkg/Features/Pci/Dxe/PciHostBridge/PciRootBridgeIo.c

@@ -911,9 +911,6 @@ RootBridgeIoPciRead (
   UINT32                    PciExtReg;
   USRA_ADDRESS              EndPointPciAddress;
   UINT8                     *pData8 = Buffer;
-  UINT8                     Size;
-
-  Size = 1 << (Width & 0x3);
 
   if (Buffer == NULL) {
     return EFI_INVALID_PARAMETER;
@@ -978,9 +975,6 @@ RootBridgeIoPciWrite (
   UINT32                    PciExtReg;
   USRA_ADDRESS              EndPointPciAddress;
   UINT8                     *pData8 = Buffer;
-  UINT8                     Size;
-
-  Size = 1 << (Width & 0x3);
 
   if (Buffer == NULL) {
     return EFI_INVALID_PARAMETER;

+ 1 - 1
Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/BuildOptions.dsc

@@ -145,7 +145,7 @@ DEFINE EDKII_DSC_FEATURE_BUILD_OPTIONS = $(EDKII_DSC_FEATURE_BUILD_OPTIONS) $(ME
    MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 [BuildOptions]
-  GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable -mabi=ms
+  GCC:*_GCC5_*_CC_FLAGS = -mabi=ms
   GCC:*_GCC5_IA32_DLINK_FLAGS = -z common-page-size=0x20 -z muldefs
   GCC:*_GCC5_X64_DLINK_FLAGS  = -z common-page-size=0x20 -z muldefs
   MSFT:*_*_*_CC_FLAGS = /FAsc

+ 1 - 3
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/AcpiTablePcds.c

@@ -27,7 +27,6 @@ TypeJunctionCityPlatformUpdateAcpiTablePcds (
   EFI_STATUS Status;
 
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   DEBUG ((DEBUG_INFO, "Uba Callback: PlatformUpdateAcpiTablePcds entered\n"));
 
@@ -36,7 +35,7 @@ TypeJunctionCityPlatformUpdateAcpiTablePcds (
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
+
   //#
   //#ACPI items
   //#
@@ -51,4 +50,3 @@ TypeJunctionCityPlatformUpdateAcpiTablePcds (
 
   return Status;
 }
-

+ 0 - 3
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/IioBifurInit.c

@@ -180,17 +180,14 @@ TypeJunctionCityIioPortBifurcationInit (
 {
   EFI_STATUS                         Status;
   EFI_HOB_GUID_TYPE                  *GuidHob;
-  EFI_PLATFORM_INFO                  *PlatformInfo;
   PLATFORM_IIO_CONFIG_UPDATE_TABLE_EX   *PlatformIioInfoPtr;
   UINTN                              PlatformIioInfoSize;
 
-
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   //
   // This is config for ICX

+ 0 - 3
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/KtiEparam.c

@@ -49,15 +49,12 @@ TypeJunctionCityInstallKtiEparamData (
 {
   EFI_STATUS                            Status;
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
-
   Status = UbaConfigPpi->AddData (
                                  UbaConfigPpi,
                                  &gPlatformKtiEparamUpdateDataGuid,

+ 0 - 3
Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLib.c

@@ -305,7 +305,6 @@ PlatformUpdateTables (
 {
   EFI_ACPI_DESCRIPTION_HEADER               *TableHeader;
   EFI_STATUS                                Status;
-  ACPI_APIC_STRUCTURE_PTR                   *ProcessorLocalApicEntry;
   UINT64                                    TempOemTableId;
   UINT32                                    Data32;
 
@@ -318,8 +317,6 @@ PlatformUpdateTables (
   }
 
   TableHeader             = NULL;
-
-  ProcessorLocalApicEntry = NULL;
   Status = EFI_SUCCESS;
 
   //

+ 0 - 2
Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibApic.c

@@ -183,7 +183,6 @@ SortCpuLocalApicInTable (
 {
   EFI_STATUS                                Status;
   EFI_PROCESSOR_INFORMATION                 ProcessorInfoBuffer;
-  UINTN                                     BufferSize;
   UINT32                                    Index;
   UINT32                                    Socket;
   UINT32                                    CurrProcessor;
@@ -197,7 +196,6 @@ SortCpuLocalApicInTable (
   CPU_ID_ORDER_MAP                          TempEntry;
   BOOLEAN                                   SecondThreadExistent;
 
-  BufferSize = 0;
   Index      = 0;
   Status     = EFI_SUCCESS;
 

+ 0 - 4
Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibDsdt.c

@@ -191,7 +191,6 @@ PatchDsdtTable (
   EFI_STATUS Status;
   UINT8                         *DsdtPointer;
   UINT32                        *Signature;
-  UINT32                        *Signature2;
   UINT32                        Fixes;
   UINT32                        NodeIndex;
   UINT8                         Counter;
@@ -322,7 +321,6 @@ PatchDsdtTable (
       // Last 4 chars of AmlOffsetTable.Pathname has FIX tag.
       //
       Signature = (UINT32 *) (mAmlOffsetTablePointer[i].Pathname + AsciiStrLen(mAmlOffsetTablePointer[i].Pathname) - 4);
-      Signature2 = (UINT32 *) (mAmlOffsetTablePointer[i].Pathname + AsciiStrLen(mAmlOffsetTablePointer[i].Pathname) - 9);
       switch (*Signature) {
         //
         // "FIX1" BUS resource for PCXX in Acpi\AcpiTables\Dsdt\SysBus.asi and PCXX.asi
@@ -451,7 +449,6 @@ PatchDsdtTable (
       // Last 4 chars of AmlOffsetTable.Pathname has FIX tag.
       //
       Signature = (UINT32 *) (mAmlOffsetTablePointer[i].Pathname + AsciiStrLen(mAmlOffsetTablePointer[i].Pathname) - 4);
-      Signature2 = (UINT32 *) (mAmlOffsetTablePointer[i].Pathname + AsciiStrLen(mAmlOffsetTablePointer[i].Pathname) - 9);
       switch (*Signature) {
         //
         // "FIX3" PCI32 resource for PCXX in Acpi\AcpiTables\Dsdt\SysBus.asi and PCXX.asi
@@ -515,7 +512,6 @@ PatchDsdtTable (
       // Last 4 chars of AmlOffsetTable.Pathname has FIX tag.
       //
       Signature = (UINT32 *) (mAmlOffsetTablePointer[i].Pathname + AsciiStrLen(mAmlOffsetTablePointer[i].Pathname) - 4);
-      Signature2 = (UINT32 *) (mAmlOffsetTablePointer[i].Pathname + AsciiStrLen(mAmlOffsetTablePointer[i].Pathname) - 9);
       switch (*Signature) {
         //
         // "FIX4" PCI64 resource for PCXX in Acpi\AcpiTables\Dsdt\SysBus.asi and PCXX.asi

+ 0 - 7
Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibSlit.c

@@ -568,7 +568,6 @@ ProcessSocketsLinks (
   ACPI_SYSTEM_LOCALITY_INFORMATION_TABLE  *SlitAcpiTable;
   UINT8                                   SourceNode;
   UINT8                                   SourceSocket;
-  UINT8                                   SourceCluster;
   UINT8                                   TargetSocket;
 
   if (NULL == Table) {
@@ -582,7 +581,6 @@ ProcessSocketsLinks (
 
   for (SourceNode = 0; SourceNode < (NodeCount - PmemNodeCount - FpgaCount); SourceNode++) {
     SourceSocket = SourceNode / NumClusters;
-    SourceCluster = SourceNode % NumClusters;
     for (TargetSocket = 0; TargetSocket < NumCpus; TargetSocket++) {
       if (SocketsLinked (GetSocketPhysicalId (SourceSocket), GetSocketPhysicalId (TargetSocket))) {
         SetMem (&SlitAcpiTable->NumSlit[(SourceNode * NodeCount) + (TargetSocket * NumClusters)].Entry,
@@ -622,7 +620,6 @@ ProcessMixedModeSocketsLinks (
   UINT16                                  EntryIdx2LM;
   UINT8                                   SourceNode;
   UINT8                                   SourceSocket;
-  UINT8                                   SourceCluster;
   UINT8                                   TargetSocket;
   UINT8                                   TargetCluster;
   BOOLEAN                                 Is2LM;
@@ -639,7 +636,6 @@ ProcessMixedModeSocketsLinks (
   for (SourceNode = 0; SourceNode < (NodeCount - PmemNodeCount - FpgaCount); SourceNode++) {
     Is2LM = (SourceNode >= NumCpus * NumClusters) ? TRUE : FALSE;
     SourceSocket = (SourceNode - NumCpus * NumClusters * (Is2LM ? 1 : 0)) / NumClusters;
-    SourceCluster = (SourceNode - NumCpus * NumClusters * (Is2LM ? 1 : 0)) % NumClusters;
 
     for (TargetSocket = 0; TargetSocket < NumCpus; TargetSocket++) {
       if (SocketsLinked (GetSocketPhysicalId (SourceSocket), GetSocketPhysicalId (TargetSocket))) {
@@ -1103,12 +1099,9 @@ InstallSlitTable (
 {
   ACPI_SYSTEM_LOCALITY_INFORMATION_TABLE *Table;
   UINTN                                  TableSize;
-  UINT8                                  NumClusters;
   UINTN                                  TableHandle = 0;
   EFI_STATUS                             Status;
 
-  NumClusters = GetNumClusters ();
-
   TableSize = sizeof (EFI_ACPI_6_2_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER) +
               sizeof (ACPI_SYSTEM_LOCALITIES_STRUCTURE) * EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT;
 

+ 1 - 3
Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibSsdt.c

@@ -496,7 +496,6 @@ PatchOem1SsdtTable (
   UINT32                      GpssFixes;
   UINT32                      CpuSkt;
   UINT32                      CpuIndex;
-  UINT32                      ThreadIndex;
   UINT32                      PackageSize;
   UINT32                      NewPackageSize;
   UINT32                      AdjustSize;
@@ -516,7 +515,7 @@ PatchOem1SsdtTable (
   CpuFixes  = 0;
   CpuSkt    = 0;
   CpuIndex  = 0;
-  ThreadIndex  = 0;
+
   CurrPtr = (UINT8 *) Table;
   EndPtr  = (CurrPtr + ((EFI_ACPI_COMMON_HEADER *) CurrPtr)->Length);
   CpuMiscData = NULL;
@@ -579,7 +578,6 @@ PatchOem1SsdtTable (
         }
 
         CpuIndex += AdjustSize;
-        ThreadIndex  = CpuIndex;
 
         ++CpuFixes;
         CpuMiscData = NULL;

+ 0 - 10
Platform/Intel/WhitleyOpenBoardPkg/Library/BoardInitLib/BoardInitPreMemLib.c

@@ -77,8 +77,6 @@ EarlyPlatformPchInit (
 {
   UINT16                          Data16;
   UINT8                           Data8;
-  UINTN                           LpcBaseAddress;
-  UINT8                           TcoRebootHappened;
   UINTN                           SpiBaseAddress;
   UINTN                           P2sbBase;
   EFI_STATUS                      Status = EFI_SUCCESS;
@@ -92,11 +90,6 @@ EarlyPlatformPchInit (
     return;
   }
 
-  LpcBaseAddress = DynamicSiLibraryPpi->MmPciBase (
-                     DEFAULT_PCI_BUS_NUMBER_PCH,
-                     PCI_DEVICE_NUMBER_PCH_LPC,
-                     PCI_FUNCTION_NUMBER_PCH_LPC
-                     );
   SpiBaseAddress = DynamicSiLibraryPpi->MmPciBase (
                      DEFAULT_PCI_BUS_NUMBER_PCH,
                      PCI_DEVICE_NUMBER_PCH_SPI,
@@ -157,10 +150,7 @@ EarlyPlatformPchInit (
   //
   Data8 = IoRead8 (PCH_TCO_BASE_ADDRESS + R_TCO_IO_TCO2_STS);
   if ((Data8 & B_TCO_IO_TCO2_STS_SECOND_TO) == B_TCO_IO_TCO2_STS_SECOND_TO) {
-    TcoRebootHappened = 1;
     DEBUG ((EFI_D_INFO, "EarlyPlatformPchInit - TCO Second TO status bit is set. This might be a TCO reboot\n"));
-  } else {
-    TcoRebootHappened = 0;
   }
 
   //

+ 1 - 7
Platform/Intel/WhitleyOpenBoardPkg/Library/MultiPlatSupportLib/MultiPlatSupportLib.c

@@ -197,14 +197,8 @@ Returns:
   UINT8                      *VarPtr;
   UINT32                     VarDataOffset;
   UINT32                     VarHobDataOffset;
-  EFI_PEI_SERVICES           **PeiServices;
 
-  //
-  // Get PeiService pointer
-  //
-  PeiServices = (EFI_PEI_SERVICES **)GetPeiServicesTablePointer ();
-
-  VarStoreHeader = (VARIABLE_STORE_HEADER*)FindDefaultHobinFfs( DefaultId, BoardId);
+  VarStoreHeader = (VARIABLE_STORE_HEADER*)FindDefaultHobinFfs (DefaultId, BoardId);
 
   //
   // Matched default data is not found.

+ 2 - 4
Platform/Intel/WhitleyOpenBoardPkg/Library/PeiPlatformHookLib/PeiPlatformHooklib.c

@@ -22,11 +22,9 @@ VOID
 GpioInit (
 )
 {
-  EFI_STATUS                  Status;
-  Status = PlatformInitGpios();
+  PlatformInitGpios ();
 }
 
-
 /**
   Configure GPIO and SIO
 
@@ -37,7 +35,7 @@ BoardInit (
   )
 {
 
-  GpioInit();
+  GpioInit ();
 
   return EFI_SUCCESS;
 }

+ 0 - 2
Platform/Intel/WhitleyOpenBoardPkg/Library/PlatformCmosAccessLib/PlatformCmosAccessLib.c

@@ -47,9 +47,7 @@ PlatformCmosGetNmiState (
   VOID
  )
 {
-  volatile UINT32           Data32;
   BOOLEAN                   Nmi;
-  Data32                    = 0;
   EFI_STATUS                Status = EFI_SUCCESS;
   DYNAMIC_SI_LIBARY_PPI     *DynamicSiLibraryPpi = NULL;
 

+ 1 - 7
Platform/Intel/WhitleyOpenBoardPkg/Library/PlatformHooksLib/PlatformHooks.c

@@ -106,7 +106,6 @@ IsAspeedPresent (
  )
 {
  BOOLEAN PresenceStatus = FALSE;
- UINT32 DeviceID;
 
  //
  //ASPEED AST2500/AST2600
@@ -120,13 +119,8 @@ IsAspeedPresent (
   // In ESPI mode, assume this SIO logic device always present.
   //
 #ifdef ESPI_ENABLE
-  DeviceID = 0;
   PresenceStatus = TRUE;
 #else
-  //
-  //right now, maybe it is ASPEED. to detect the  device ID.
-  //
-  DeviceID = ReadAHBDword (SCU7C);
   //
   //There is a Aspeed card need to support as well. it's type is AST2500 A1 EVB.
   //
@@ -147,7 +141,7 @@ IsAspeedPresent (
   //AST2520-A1 0x04010203
   //AST2530-A1 0x04010403
   //
-  if ((DeviceID & 0xff0000ff) == 0x04000003) {
+  if ((ReadAHBDword (SCU7C) & 0xff0000ff) == 0x04000003) {
    PresenceStatus = TRUE;
   }
 #endif

+ 0 - 7
Platform/Intel/WhitleyOpenBoardPkg/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.c

@@ -249,7 +249,6 @@ Returns:
 --*/
 {
   UINT8                           Index;
-  UINTN                           LpcBaseAddress;
   UINT8                           MaxSataPorts;
   UINT8                           BmcRootPort;
   UINT8                           *SmBusReservedTable;
@@ -274,12 +273,6 @@ Returns:
   SetupVariables = PcdGetPtr(PcdSetup);
   PchRcVariables = PcdGetPtr(PcdPchSetup);
 
-  LpcBaseAddress = DynamicSiLibraryPpi->MmPciBase (
-                    DEFAULT_PCI_BUS_NUMBER_PCH,
-                    PCI_DEVICE_NUMBER_PCH_LPC,
-                    PCI_FUNCTION_NUMBER_PCH_LPC
-                    );
-
   PchPolicy->Port80Route          = PchRcVariables->IchPort80Route;
 
   //

+ 1 - 2
Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c

@@ -637,7 +637,6 @@ PlatformInfoInit (
   EFI_PEI_READ_ONLY_VARIABLE2_PPI       *PeiVariable;
   EFI_PLATFORM_INFO       PlatformInfoHob;
   EFI_PLATFORM_INFO       tempPlatformInfoHob;
-  UINT8                   ChipId;
   UINT32                  Delay;
   UINT32                  CpuType;
   UINT8                   CpuStepping;
@@ -673,7 +672,7 @@ PlatformInfoInit (
   for (Delay = 0; Delay < 40; Delay++) IoRead8  (0x61);
   IoWrite8 (PILOTIV_SIO_INDEX_PORT, PILOTIV_CHIP_ID_REG);
   for (Delay = 0; Delay < 40; Delay++) IoRead8  (0x61);
-  ChipId = IoRead8  (PILOTIV_SIO_DATA_PORT);
+  IoRead8  (PILOTIV_SIO_DATA_PORT);
   for (Delay = 0; Delay < 40; Delay++) IoRead8  (0x61);
   IoWrite8 (PILOTIV_SIO_INDEX_PORT, PILOTIV_SIO_LOCK);
   for (Delay = 0; Delay < 40; Delay++) IoRead8  (0x61);

+ 2 - 2
Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dec

@@ -79,10 +79,10 @@
   gDxePlatformUbaOcConfigDataGuid                     = { 0x2638009e, 0x3850, 0x4e4b, { 0xb0, 0x5d, 0x04, 0x2a, 0x32, 0xdb, 0xb9, 0xd1 } }
   gIioPortBifurcationInitDataGuid                     = { 0x853e5958, 0xb3d6, 0x4d98, { 0xa7, 0x7c, 0x10, 0xb, 0xb4, 0xed, 0x94, 0xb } }
   gPlatformGpioPlatformConfigDataGuid                 = { 0xd2c2adab, 0x80c0, 0x4a13, { 0xa0, 0xf8, 0xad, 0xed, 0xe1, 0xa5, 0x17, 0x40 } }
-
 #
 # UBA_END
 #
+
   gReserveMemFlagVariableGuid                         = { 0xb87aa73f, 0xdcb3, 0x4533, { 0x83, 0x98, 0x6c, 0x12, 0x84, 0x27, 0x28, 0x40 } }
   gEfiOpaSocketMapHobGuid                             = { 0x829d41d2, 0x6ca5, 0x485b, { 0xa1, 0xa2, 0xd1, 0xb7, 0x96, 0x27, 0xab, 0xcd } }
   gEfiPlatformTxtPolicyDataGuid                       = { 0xa353290b, 0x867d, 0x4cd3, { 0xa8, 0x1b, 0x4b, 0x7e, 0x5e, 0x10, 0x0e, 0x16 } }
@@ -169,7 +169,7 @@
   gEfiPlatformTypeCooperCityRPProtocolGuid            = { 0x45c302e1, 0x4b86, 0x89be, { 0xab, 0x0f, 0x5e, 0xb5, 0x57, 0xdf, 0xe8, 0xd8 } }
   gEfiPlatformTypeJunctionCityProtocolGuid            = { 0xB1C2B1C9, 0xB606, 0x4B62, { 0x9D, 0x78, 0xCB, 0xD6, 0x0F, 0xF9, 0x0D, 0x0C } }
   gEfiPlatformTypeAowandaProtocolGuid                 = { 0x65231A3C, 0xC343, 0x4C7E, { 0xA4, 0x5E, 0x0F, 0x99, 0x74, 0xA6, 0x90, 0x83 } }
-
+  gEfiPlatformTypeBoardPortTemplateProtocolGuid       = { 0xecaa1083, 0x9d72, 0x44d1, { 0xb1, 0x42, 0x0e, 0xd8, 0x0a, 0xd1, 0x37, 0xd2 } }
 #
 # UBA_END
 #

+ 0 - 10
Platform/Intel/WhitleyOpenBoardPkg/Uba/CfgDb/Dxe/CfgDbDxe.c

@@ -360,18 +360,13 @@ DxeUbaGetData (
   )
 {
   EFI_STATUS                      Status;
-  UBA_DXE_PRIVATE_DATA            *UbaDxePrivate;
   UBA_BOARD_NODE                  *SkuNode;
-  UbaDxePrivate = NULL;
   SkuNode = NULL;
 
   if ((ResId == NULL) || (Data == NULL) || (DataSize == NULL)) {
     return EFI_INVALID_PARAMETER;
   }
 
-  UbaDxePrivate = PRIVATE_DATA_FROM_PROTOCOL (This);
-
-
   Status = InternalGetSkuNode (This, &SkuNode);
   if (EFI_ERROR (Status)) {
     return Status;
@@ -406,15 +401,11 @@ InternalGetConfigDataFromHob (
   UBA_CONFIG_HOB_HEADER                 *HobHeader;
   UBA_CONFIG_HOB_FIELD                  *HobDataFieldStart;
   UINTN                                 Index;
-  UBA_DXE_PRIVATE_DATA                  *UbaDxePrivate;
   UBA_BOARD_NODE                        *SkuNode;
   HobHeader = NULL;
   HobDataFieldStart = NULL;
-  UbaDxePrivate = NULL;
   SkuNode = NULL;
 
-  UbaDxePrivate = PRIVATE_DATA_FROM_PROTOCOL (This);
-
   Hob.Raw = GetFirstGuidHob (&gUbaCurrentConfigHobGuid);
   ASSERT (Hob.Raw != NULL);
   if (Hob.Raw == NULL) {
@@ -515,4 +506,3 @@ UbaConfigDatabaseEntry (
 
   return Status;
 }
-

+ 0 - 5
Platform/Intel/WhitleyOpenBoardPkg/Uba/CfgDb/Pei/CfgDbPei.c

@@ -546,9 +546,7 @@ PeiUbaGetData (
   )
 {
   EFI_STATUS                            Status;
-  UBA_PEIM_PRIVATE_DATA                 *UbaPeimPrivate;
   UBA_BOARD_NODE                        *SkuNode;
-  UbaPeimPrivate = NULL;
   SkuNode = NULL;
 
   if ((ResId == NULL) || (Data == NULL) || (DataSize == NULL)) {
@@ -557,8 +555,6 @@ PeiUbaGetData (
 
   PeiCheckPointerRelocated (This);
 
-  UbaPeimPrivate = PRIVATE_DATA_FROM_PPI (This);
-
   Status = InternalGetSkuNode (This, &SkuNode);
   if (EFI_ERROR (Status)) {
     return Status;
@@ -800,4 +796,3 @@ UbaConfigDatabasePeimEntry (
 
   return Status;
 }
-

+ 0 - 2
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c

@@ -29,7 +29,6 @@ InstallAcpiFixupTableData (
 {
   EFI_STATUS                            Status = EFI_SUCCESS;
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
   ACPI_FIX_UPDATE_TABLE                 *PtrTable;
   UINT32                                TableSize;
 
@@ -38,7 +37,6 @@ InstallAcpiFixupTableData (
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   PtrTable = &FixupTableUpdate10nm;
   TableSize = sizeof(FixupTableUpdate10nm);

+ 0 - 4
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c

@@ -36,14 +36,12 @@ InstallPirqData (
   PLATFORM_PIRQ_UPDATE_TABLE            *PtrTable;
   UINT32                                TableSize;
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   PtrTable = &PirqUpdate10nm;
   TableSize = sizeof(PirqUpdate10nm);
@@ -76,14 +74,12 @@ InstallMpTableData (
   PLATFORM_MP_UPDATE_TABLE              *PtrTable;
   UINT32                                TableSize;
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   PtrTable = &MpTableUpdate10nm;
   TableSize = sizeof(MpTableUpdate10nm);

+ 1 - 3
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeCooperCityRP/Pei/AcpiTablePcds.c

@@ -26,14 +26,13 @@ TypeCooperCityRPPlatformUpdateAcpiTablePcds (
   EFI_STATUS Status;
 
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
+
   //#
   //#ACPI items
   //#
@@ -48,4 +47,3 @@ TypeCooperCityRPPlatformUpdateAcpiTablePcds (
 
   return Status;
 }
-

+ 1 - 3
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/AcpiTablePcds.c

@@ -26,7 +26,6 @@ TypeWilsonCityRPPlatformUpdateAcpiTablePcds (
   EFI_STATUS Status;
 
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   DEBUG ((EFI_D_INFO, "Uba Callback: PlatformUpdateAcpiTablePcds entered\n"));
 
@@ -35,7 +34,7 @@ TypeWilsonCityRPPlatformUpdateAcpiTablePcds (
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
+
   //#
   //#ACPI items
   //#
@@ -50,4 +49,3 @@ TypeWilsonCityRPPlatformUpdateAcpiTablePcds (
 
   return Status;
 }
-

+ 3 - 5
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/IioBifurInit.c

@@ -182,11 +182,10 @@ TypeWilsonCityRPIioPortBifurcationInit (
   IN UBA_CONFIG_DATABASE_PPI    *UbaConfigPpi
 )
 {
-  EFI_STATUS                         Status;
-  EFI_HOB_GUID_TYPE                  *GuidHob;
-  EFI_PLATFORM_INFO                  *PlatformInfo;
+  EFI_STATUS                            Status;
+  EFI_HOB_GUID_TYPE                     *GuidHob;
   PLATFORM_IIO_CONFIG_UPDATE_TABLE_EX   *PlatformIioInfoPtr;
-  UINTN                              PlatformIioInfoSize;
+  UINTN                                 PlatformIioInfoSize;
 
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
@@ -194,7 +193,6 @@ TypeWilsonCityRPIioPortBifurcationInit (
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   //
   // This is config for ICX

+ 0 - 2
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/KtiEparam.c

@@ -48,14 +48,12 @@ TypeWilsonCityRPInstallKtiEparamData (
 {
   EFI_STATUS                            Status;
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   Status = UbaConfigPpi->AddData (
                                  UbaConfigPpi,

+ 1 - 3
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/AcpiTablePcds.c

@@ -26,14 +26,13 @@ TypeWilsonCitySMTPlatformUpdateAcpiTablePcds (
   EFI_STATUS Status;
 
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
+
   //#
   //#ACPI items
   //#
@@ -48,4 +47,3 @@ TypeWilsonCitySMTPlatformUpdateAcpiTablePcds (
 
   return Status;
 }
-

+ 3 - 5
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/IioBifurInit.c

@@ -185,11 +185,10 @@ TypeWilsonCitySMTIioPortBifurcationInit (
   IN UBA_CONFIG_DATABASE_PPI    *UbaConfigPpi
 )
 {
-  EFI_STATUS                         Status;
-  EFI_HOB_GUID_TYPE                  *GuidHob;
-  EFI_PLATFORM_INFO                  *PlatformInfo;
+  EFI_STATUS                            Status;
+  EFI_HOB_GUID_TYPE                     *GuidHob;
   PLATFORM_IIO_CONFIG_UPDATE_TABLE_EX   *PlatformIioInfoPtr;
-  UINTN                              PlatformIioInfoSize;
+  UINTN                                 PlatformIioInfoSize;
 
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
@@ -197,7 +196,6 @@ TypeWilsonCitySMTIioPortBifurcationInit (
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   //
   // This is config for ICX

+ 0 - 2
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/KtiEparam.c

@@ -59,14 +59,12 @@ TypeWilsonCitySMTInstallKtiEparamData (
 {
   EFI_STATUS                            Status;
   EFI_HOB_GUID_TYPE                     *GuidHob;
-  EFI_PLATFORM_INFO                     *PlatformInfo;
 
   GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
   ASSERT (GuidHob != NULL);
   if (GuidHob == NULL) {
     return EFI_NOT_FOUND;
   }
-  PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
 
   Status = UbaConfigPpi->AddData (
                                  UbaConfigPpi,