[Skiboot] [PATCH 04/10] sparse: fix endian types of struct imc_chip_cb members

Stewart Smith stewart at linux.ibm.com
Thu Jul 18 16:51:11 AEST 2019


hw/imc.c:188:46: warning: incorrect type in assignment (different base types)
hw/imc.c:188:46:    expected unsigned long long [usertype] imc_chip_command
hw/imc.c:188:46:    got restricted beint64_t
hw/imc.c:370:41: warning: incorrect type in argument 1 (different base types)
hw/imc.c:370:41:    expected restricted beint64_t [usertype] be_val
hw/imc.c:370:41:    got unsigned long long [usertype] imc_chip_avl_vector
hw/imc.c:833:38: warning: incorrect type in assignment (different base types)
hw/imc.c:833:38:    expected unsigned long long [usertype] imc_chip_command
hw/imc.c:833:38:    got restricted beint64_t
hw/imc.c:894:38: warning: incorrect type in assignment (different base types)
hw/imc.c:894:38:    expected unsigned long long [usertype] imc_chip_command
hw/imc.c:894:38:    got restricted beint64_t

Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 include/imc.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/imc.h b/include/imc.h
index 6b04bb36fd1f..9b658241a8dc 100644
--- a/include/imc.h
+++ b/include/imc.h
@@ -97,12 +97,12 @@
  */
 struct imc_chip_cb
 {
-	u64 imc_chip_run_status;
-	u64 imc_chip_command;
-	u64 imc_chip_collection_speed;
-	u64 imc_chip_avl_vector;
-	u64 imc_chip_run_mode;
-};
+	be64 imc_chip_run_status;
+	be64 imc_chip_command;
+	be64 imc_chip_collection_speed;
+	be64 imc_chip_avl_vector;
+	be64 imc_chip_run_mode;
+} __packed;
 
 /* Size of IMC dtb LID (256KBytes) */
 #define MAX_DECOMPRESSED_IMC_DTB_SIZE		0x40000
-- 
2.21.0



More information about the Skiboot mailing list