diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-11-10 14:53:29 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-11-10 14:53:29 +1100 |
commit | 0a55b1c597fb12fc9f6d32fac3d09ab08362d2be (patch) | |
tree | b3a4d012a5b0ef6e9c3c9dcf95a89c1dbae7d3ed /hw/fsp/fsp-mem-err.c | |
parent | 01cd49016c80fef1c2f3c91e496ebf8592556e0c (diff) | |
download | talos-skiboot-0a55b1c597fb12fc9f6d32fac3d09ab08362d2be.tar.gz talos-skiboot-0a55b1c597fb12fc9f6d32fac3d09ab08362d2be.zip |
sparse: fix be64 degrades to integer warnings in fsp-mem-err.c
No code changes in skiboot due to being BE
hw/fsp/fsp-mem-err.c:162:44: warning: restricted beint64_t degrades to integer
hw/fsp/fsp-mem-err.c:263:45: warning: restricted beint64_t degrades to integer
hw/fsp/fsp-mem-err.c:266:52: warning: restricted beint64_t degrades to integer
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp/fsp-mem-err.c')
-rw-r--r-- | hw/fsp/fsp-mem-err.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/fsp/fsp-mem-err.c b/hw/fsp/fsp-mem-err.c index 526afaf2..1f29a001 100644 --- a/hw/fsp/fsp-mem-err.c +++ b/hw/fsp/fsp-mem-err.c @@ -159,7 +159,7 @@ static bool is_resilience_event_exist(u64 paddr) list_for_each(&mem_error_list, entry, list) { merr_evt = &entry->data; if ((merr_evt->type == OPAL_MEM_ERR_TYPE_RESILIENCE) && - (merr_evt->u.resilience.physical_address_start + (be64_to_cpu(merr_evt->u.resilience.physical_address_start) == paddr)) { found = 1; break; @@ -260,10 +260,10 @@ static bool update_memory_deallocation_event(u64 paddr_start, u64 paddr_end) list_for_each(&mem_error_list, entry, list) { merr_evt = &entry->data; if ((merr_evt->type == OPAL_MEM_ERR_TYPE_DYN_DALLOC) && - (merr_evt->u.dyn_dealloc.physical_address_start + (be64_to_cpu(merr_evt->u.dyn_dealloc.physical_address_start) == paddr_start)) { found = 1; - if (merr_evt->u.dyn_dealloc.physical_address_end + if (be64_to_cpu(merr_evt->u.dyn_dealloc.physical_address_end) < paddr_end) merr_evt->u.dyn_dealloc.physical_address_end = paddr_end; @@ -353,13 +353,13 @@ static bool fsp_mem_err_msg(u32 cmd_sub_mod, struct fsp_msg *msg) * correctable/Uncorrectable/scrub UE errors with real * address of 4K memory page in which the error occurred. */ - paddr_start = *((u64 *)&msg->data.words[0]); + paddr_start = be64_to_cpu(*((__be64 *)&msg->data.words[0])); printf("Got memory resilience error message for " "paddr=0x%016llux\n", paddr_start); return handle_memory_resilience(cmd_sub_mod, paddr_start); case FSP_CMD_MEM_DYN_DEALLOC: - paddr_start = *((u64 *)&msg->data.words[0]); - paddr_end = *((u64 *)&msg->data.words[2]); + paddr_start = be64_to_cpu(*((__be64 *)&msg->data.words[0])); + paddr_end = be64_to_cpu(*((__be64 *)&msg->data.words[2])); printf("Got dynamic memory deallocation message: " "paddr_start=0x%016llux, paddr_end=0x%016llux\n", paddr_start, paddr_end); |