diff mbox series

[v4,3/8] libpore: Build fix for p9_stop_api

Message ID 1505460876-7303-4-git-send-email-akshay.adiga@linux.vnet.ibm.com
State Superseded
Headers show
Series Enable stop4 idle state | expand

Commit Message

Akshay Adiga Sept. 15, 2017, 7:34 a.m. UTC
Build fix for "declaration-after-statement".

Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
---
 libpore/p9_stop_data_struct.H | 2 +-
 libpore/p9_stop_util.C        | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Vaidyanathan Srinivasan Sept. 15, 2017, 8:25 a.m. UTC | #1
* Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> [2017-09-15 13:04:31]:

> Build fix for "declaration-after-statement".
> 
> Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>

Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>

> ---
>  libpore/p9_stop_data_struct.H | 2 +-
>  libpore/p9_stop_util.C        | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libpore/p9_stop_data_struct.H b/libpore/p9_stop_data_struct.H
> index 2201021..d1b5054 100644
> --- a/libpore/p9_stop_data_struct.H
> +++ b/libpore/p9_stop_data_struct.H
> @@ -35,7 +35,7 @@
>  #ifndef __STOP_DATA_STRUCT_
>  #define __STOP_DATA_STRUCT_
> 
> -#ifndef  _AIX
> +#if !(defined  _AIX) && !(defined __SKIBOOT__)
>      #include <endian.h>
>  #endif
> 
> diff --git a/libpore/p9_stop_util.C b/libpore/p9_stop_util.C
> index 6fb8d67..c351b58 100644
> --- a/libpore/p9_stop_util.C
> +++ b/libpore/p9_stop_util.C
> @@ -50,6 +50,7 @@ namespace stopImageSection
>   */
>  static StopReturnCode_t  isFusedMode( void* const i_pImage, bool* o_fusedMode )
>  {
> +    uint64_t cpmrCheckWord;
>      StopReturnCode_t l_rc = STOP_SAVE_SUCCESS;
>      *o_fusedMode = false;
> 
> @@ -66,7 +67,7 @@ static StopReturnCode_t  isFusedMode( void* const i_pImage, bool* o_fusedMode )
>          }
> 
> 
> -        uint64_t cpmrCheckWord = SWIZZLE_8_BYTE(pHomer->cpmrMagicWord);
> +        cpmrCheckWord = SWIZZLE_8_BYTE(pHomer->cpmrMagicWord);
>          cpmrCheckWord = cpmrCheckWord >> 32;
> 
>          if( CPMR_REGION_CHECK_WORD != cpmrCheckWord )
> -- 
> 2.5.5
>
diff mbox series

Patch

diff --git a/libpore/p9_stop_data_struct.H b/libpore/p9_stop_data_struct.H
index 2201021..d1b5054 100644
--- a/libpore/p9_stop_data_struct.H
+++ b/libpore/p9_stop_data_struct.H
@@ -35,7 +35,7 @@ 
 #ifndef __STOP_DATA_STRUCT_
 #define __STOP_DATA_STRUCT_
 
-#ifndef  _AIX
+#if !(defined  _AIX) && !(defined __SKIBOOT__)
     #include <endian.h>
 #endif
 
diff --git a/libpore/p9_stop_util.C b/libpore/p9_stop_util.C
index 6fb8d67..c351b58 100644
--- a/libpore/p9_stop_util.C
+++ b/libpore/p9_stop_util.C
@@ -50,6 +50,7 @@  namespace stopImageSection
  */
 static StopReturnCode_t  isFusedMode( void* const i_pImage, bool* o_fusedMode )
 {
+    uint64_t cpmrCheckWord;
     StopReturnCode_t l_rc = STOP_SAVE_SUCCESS;
     *o_fusedMode = false;
 
@@ -66,7 +67,7 @@  static StopReturnCode_t  isFusedMode( void* const i_pImage, bool* o_fusedMode )
         }
 
 
-        uint64_t cpmrCheckWord = SWIZZLE_8_BYTE(pHomer->cpmrMagicWord);
+        cpmrCheckWord = SWIZZLE_8_BYTE(pHomer->cpmrMagicWord);
         cpmrCheckWord = cpmrCheckWord >> 32;
 
         if( CPMR_REGION_CHECK_WORD != cpmrCheckWord )