[edk2-platforms][PATCH V1 1/5] IpmiFeaturePkg/GenericIpmi: Fix GCC compilation warnings


Oram, Isaac W
 

Fix compiler warnings for unused variables.
Fix PeimIpmiInterfaceInit to return initialization status instead of
EFI_SUCCESS.

Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Liming Gao <gaoliming@...>
Signed-off-by: Isaac Oram <isaac.w.oram@...>
---
.../IpmiFeaturePkg/GenericIpmi/Common/KcsBmc.c | 8 +++-----
.../IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c | 3 +--
2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Common/KcsBmc.c b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Common/KcsBmc.c
index 7243d37cc5..cf1929f399 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Common/KcsBmc.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Common/KcsBmc.c
@@ -36,7 +36,6 @@ Returns:
EFI_STATUS Status;
UINT8 KcsData;
KCS_STATUS KcsStatus;
- UINT8 BmcStatus;
UINT8 RetryCount;
UINT64 TimeOut;

@@ -101,7 +100,7 @@ Returns:
TimeOut++;
} while (!KcsStatus.Status.Obf);

- BmcStatus = IoRead8 (KcsPort);
+ IoRead8 (KcsPort);

KcsData = KCS_READ;
IoWrite8 (KcsPort, KcsData);
@@ -184,7 +183,6 @@ Returns:
{
EFI_STATUS Status;
KCS_STATUS KcsStatus;
- UINT8 KcsData;
UINT64 TimeOut;

if (Idle == NULL) {
@@ -205,7 +203,7 @@ Returns:
} while (KcsStatus.Status.Ibf);

if (KcsState == KcsWriteState) {
- KcsData = IoRead8 (KcsPort);
+ IoRead8 (KcsPort);
}

if (KcsStatus.Status.State != KcsState) {
@@ -231,7 +229,7 @@ Returns:
}

if (KcsState == KcsWriteState || (*Idle == TRUE)) {
- KcsData = IoRead8 (KcsPort);
+ IoRead8 (KcsPort);
}

return EFI_SUCCESS;
diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c
index 14040c089c..3efb772b68 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c
@@ -167,13 +167,12 @@ PeimIpmiInterfaceInit (
{
EFI_STATUS Status;

-
//
// Performing Ipmi KCS physical layer initialization
//
Status = PeiInitializeIpmiKcsPhysicalLayer (PeiServices);

- return EFI_SUCCESS;
+ return Status;
} // PeimIpmiInterfaceInit()


--
2.36.1.windows.1