diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-11-10 11:15:44 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-11-10 11:15:44 +1100 |
commit | 8144797db2649fe399f3d4262b85a5a85c9e1c79 (patch) | |
tree | 34654746e60b3d4a48640dd0f313bb3d67256ea1 /hw | |
parent | 9d8d4e4d9e3e3663d9fbdab5b3a1863f485efe4f (diff) | |
download | talos-skiboot-8144797db2649fe399f3d4262b85a5a85c9e1c79.tar.gz talos-skiboot-8144797db2649fe399f3d4262b85a5a85c9e1c79.zip |
sparse: fix endian annotation warnings in ipmi-rtc.c
hw/ipmi/ipmi-rtc.c:41:28: warning: incorrect type in argument 1 (different base types)
hw/ipmi/ipmi-rtc.c:41:28: expected restricted leint32_t [usertype] le_val
hw/ipmi/ipmi-rtc.c:41:28: got unsigned int [unsigned] [addressable] [usertype] result
hw/ipmi/ipmi-rtc.c:66:12: warning: incorrect type in assignment (different base types)
hw/ipmi/ipmi-rtc.c:66:12: expected unsigned int [unsigned] [usertype] tv
hw/ipmi/ipmi-rtc.c:66:12: got restricted leint32_t
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ipmi/ipmi-rtc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/ipmi/ipmi-rtc.c b/hw/ipmi/ipmi-rtc.c index 01fb3e1b..ba6f9777 100644 --- a/hw/ipmi/ipmi-rtc.c +++ b/hw/ipmi/ipmi-rtc.c @@ -34,7 +34,7 @@ static void get_sel_time_error(struct ipmi_msg *msg) static void get_sel_time_complete(struct ipmi_msg *msg) { struct tm tm; - uint32_t result; + le32 result; time_t time; memcpy(&result, msg->data, 4); @@ -59,12 +59,12 @@ static int64_t ipmi_get_sel_time(void) return ipmi_queue_msg(msg); } -static int64_t ipmi_set_sel_time(uint32_t tv) +static int64_t ipmi_set_sel_time(uint32_t _tv) { struct ipmi_msg *msg; + const le32 tv = cpu_to_le32(_tv); - tv = cpu_to_le32(tv); - msg = ipmi_mkmsg_simple(IPMI_SET_SEL_TIME, &tv, sizeof(tv)); + msg = ipmi_mkmsg_simple(IPMI_SET_SEL_TIME, (void*)&tv, sizeof(tv)); if (!msg) return OPAL_HARDWARE; |