[edk2-devel] [edk2-platforms][PATCH V1 1/2] KabylakeOpenBoardPkg: Fix GCC Build Failures

Kubacki, Michael A posted 2 patches 6 years, 5 months ago
There is a newer version of this series
[edk2-devel] [edk2-platforms][PATCH V1 1/2] KabylakeOpenBoardPkg: Fix GCC Build Failures
Posted by Kubacki, Michael A 6 years, 5 months ago
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2109

Fixes build failures on GCC7.3.0. Tested on Ubunutu 18.04.1 LTS.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c | 2 +-
 Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c                         | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
index d73fc77f69..d40eecae95 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
@@ -174,7 +174,7 @@ SecPlatformMain (
     //
     CopyMem (CopyDestinationPointer, mPeiCoreFvLocationPpiList, sizeof (mPeiCoreFvLocationPpiList));
     TopOfTemporaryRamPpiIndex = 1;
-    (UINT8 *) CopyDestinationPointer += sizeof(mPeiCoreFvLocationPpiList);
+    CopyDestinationPointer += sizeof (mPeiCoreFvLocationPpiList);
   }
   CopyMem (CopyDestinationPointer, mPeiSecPlatformPpi, sizeof(mPeiSecPlatformPpi));
   //
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c b/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c
index ead1e6df19..acab1326ff 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c
@@ -70,12 +70,11 @@ GpioExpGetRegister (
   IN UINT8 Register
   )
 {
-  EFI_STATUS Status;
   UINT8 WriBuf[1];
   UINT8 ReBuf[1] = {0};
 
   WriBuf[0] = Register;
-  Status = I2cWriteRead( Bar0, TCA6424_I2C_ADDRESS+Address, 1, WriBuf, 1, ReBuf, WAIT_1_SECOND);
+  I2cWriteRead (Bar0, TCA6424_I2C_ADDRESS + Address, 1, WriBuf, 1, ReBuf, WAIT_1_SECOND);
 
   return ReBuf[0];
 }
@@ -99,13 +98,12 @@ GpioExpSetRegister (
   IN UINT8 Value
   )
 {
-  EFI_STATUS Status;
   UINT8 WriBuf[2];
 
   WriBuf[0] = Register;
   WriBuf[1] = Value;
-  Status = I2cWriteRead( Bar0, TCA6424_I2C_ADDRESS+Address, 2, WriBuf, 0, NULL, WAIT_1_SECOND);
 
+  I2cWriteRead (Bar0, TCA6424_I2C_ADDRESS + Address, 2, WriBuf, 0, NULL, WAIT_1_SECOND);
 }
 /**
   Set the input register to a give value mentioned in the function.
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46219): https://edk2.groups.io/g/devel/message/46219
Mute This Topic: https://groups.io/mt/32992321/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms][PATCH V1 1/2] KabylakeOpenBoardPkg: Fix GCC Build Failures
Posted by Chiu, Chasel 6 years, 5 months ago
BaseGpioExpanderLib.c still having 2017 in copyright, please help to extend it.
With above change Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Kubacki, Michael A
> Sent: Friday, August 23, 2019 1:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-devel] [edk2-platforms][PATCH V1 1/2] KabylakeOpenBoardPkg:
> Fix GCC Build Failures
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2109
> 
> Fixes build failures on GCC7.3.0. Tested on Ubunutu 18.04.1 LTS.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> ---
> 
> Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper
> PlatformSecLib/FspWrapperPlatformSecLib.c | 2 +-
> 
> Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseG
> pioExpanderLib.c                         | 6 ++----
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp
> erPlatformSecLib/FspWrapperPlatformSecLib.c
> b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp
> erPlatformSecLib/FspWrapperPlatformSecLib.c
> index d73fc77f69..d40eecae95 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp
> erPlatformSecLib/FspWrapperPlatformSecLib.c
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp
> erPlatformSecLib/FspWrapperPlatformSecLib.c
> @@ -174,7 +174,7 @@ SecPlatformMain (
>      //
>      CopyMem (CopyDestinationPointer, mPeiCoreFvLocationPpiList, sizeof
> (mPeiCoreFvLocationPpiList));
>      TopOfTemporaryRamPpiIndex = 1;
> -    (UINT8 *) CopyDestinationPointer += sizeof(mPeiCoreFvLocationPpiList);
> +    CopyDestinationPointer += sizeof (mPeiCoreFvLocationPpiList);
>    }
>    CopyMem (CopyDestinationPointer, mPeiSecPlatformPpi,
> sizeof(mPeiSecPlatformPpi));
>    //
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/Bas
> eGpioExpanderLib.c
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/Bas
> eGpioExpanderLib.c
> index ead1e6df19..acab1326ff 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/Bas
> eGpioExpanderLib.c
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/Bas
> eGpioExpanderLib.c
> @@ -70,12 +70,11 @@ GpioExpGetRegister (
>    IN UINT8 Register
>    )
>  {
> -  EFI_STATUS Status;
>    UINT8 WriBuf[1];
>    UINT8 ReBuf[1] = {0};
> 
>    WriBuf[0] = Register;
> -  Status = I2cWriteRead( Bar0, TCA6424_I2C_ADDRESS+Address, 1, WriBuf, 1,
> ReBuf, WAIT_1_SECOND);
> +  I2cWriteRead (Bar0, TCA6424_I2C_ADDRESS + Address, 1, WriBuf, 1, ReBuf,
> WAIT_1_SECOND);
> 
>    return ReBuf[0];
>  }
> @@ -99,13 +98,12 @@ GpioExpSetRegister (
>    IN UINT8 Value
>    )
>  {
> -  EFI_STATUS Status;
>    UINT8 WriBuf[2];
> 
>    WriBuf[0] = Register;
>    WriBuf[1] = Value;
> -  Status = I2cWriteRead( Bar0, TCA6424_I2C_ADDRESS+Address, 2, WriBuf, 0,
> NULL, WAIT_1_SECOND);
> 
> +  I2cWriteRead (Bar0, TCA6424_I2C_ADDRESS + Address, 2, WriBuf, 0, NULL,
> WAIT_1_SECOND);
>  }
>  /**
>    Set the input register to a give value mentioned in the function.
> --
> 2.16.2.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46224): https://edk2.groups.io/g/devel/message/46224
Mute This Topic: https://groups.io/mt/32992321/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms][PATCH V1 1/2] KabylakeOpenBoardPkg: Fix GCC Build Failures
Posted by Nate DeSimone 6 years, 5 months ago
With copyright year change...

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com><

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Kubacki, Michael A
Sent: Thursday, August 22, 2019 10:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2-devel] [edk2-platforms][PATCH V1 1/2] KabylakeOpenBoardPkg: Fix GCC Build Failures

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2109

Fixes build failures on GCC7.3.0. Tested on Ubunutu 18.04.1 LTS.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c | 2 +-
 Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c                         | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
index d73fc77f69..d40eecae95 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
@@ -174,7 +174,7 @@ SecPlatformMain (
     //
     CopyMem (CopyDestinationPointer, mPeiCoreFvLocationPpiList, sizeof (mPeiCoreFvLocationPpiList));
     TopOfTemporaryRamPpiIndex = 1;
-    (UINT8 *) CopyDestinationPointer += sizeof(mPeiCoreFvLocationPpiList);
+    CopyDestinationPointer += sizeof (mPeiCoreFvLocationPpiList);
   }
   CopyMem (CopyDestinationPointer, mPeiSecPlatformPpi, sizeof(mPeiSecPlatformPpi));
   //
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c b/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c
index ead1e6df19..acab1326ff 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.c
@@ -70,12 +70,11 @@ GpioExpGetRegister (
   IN UINT8 Register
   )
 {
-  EFI_STATUS Status;
   UINT8 WriBuf[1];
   UINT8 ReBuf[1] = {0};
 
   WriBuf[0] = Register;
-  Status = I2cWriteRead( Bar0, TCA6424_I2C_ADDRESS+Address, 1, WriBuf, 1, ReBuf, WAIT_1_SECOND);
+  I2cWriteRead (Bar0, TCA6424_I2C_ADDRESS + Address, 1, WriBuf, 1, ReBuf, WAIT_1_SECOND);
 
   return ReBuf[0];
 }
@@ -99,13 +98,12 @@ GpioExpSetRegister (
   IN UINT8 Value
   )
 {
-  EFI_STATUS Status;
   UINT8 WriBuf[2];
 
   WriBuf[0] = Register;
   WriBuf[1] = Value;
-  Status = I2cWriteRead( Bar0, TCA6424_I2C_ADDRESS+Address, 2, WriBuf, 0, NULL, WAIT_1_SECOND);
 
+  I2cWriteRead (Bar0, TCA6424_I2C_ADDRESS + Address, 2, WriBuf, 0, NULL, WAIT_1_SECOND);
 }
 /**
   Set the input register to a give value mentioned in the function.
-- 
2.16.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46333): https://edk2.groups.io/g/devel/message/46333
Mute This Topic: https://groups.io/mt/32992321/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-