aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-10 14:56:06 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-10 14:56:06 +1100
commitd5ab95829c21041c7d0137470bb03b8a6af6354a (patch)
tree729a8346768dcc0e93a10811aeccd35e2872366d /hw
parent0a55b1c597fb12fc9f6d32fac3d09ab08362d2be (diff)
downloadskiboot-d5ab95829c21041c7d0137470bb03b8a6af6354a.zip
skiboot-d5ab95829c21041c7d0137470bb03b8a6af6354a.tar.gz
skiboot-d5ab95829c21041c7d0137470bb03b8a6af6354a.tar.bz2
sparse: fix incorrect type in assignment in fsp-mem-err.c
Since skiboot is all BE, no built code changes hw/fsp/fsp-mem-err.c:215:35: warning: invalid assignment: |= hw/fsp/fsp-mem-err.c:215:35: left side has type restricted beint16_t hw/fsp/fsp-mem-err.c:215:35: right side has type int hw/fsp/fsp-mem-err.c:228:57: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:228:57: expected restricted beint64_t [addressable] [assigned] [usertype] physical_address_start hw/fsp/fsp-mem-err.c:228:57: got unsigned long long [unsigned] [usertype] paddr hw/fsp/fsp-mem-err.c:229:55: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:229:55: expected restricted beint64_t [addressable] [assigned] [usertype] physical_address_end hw/fsp/fsp-mem-err.c:229:55: got unsigned long long hw/fsp/fsp-mem-err.c:269:65: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:269:65: expected restricted beint64_t [usertype] physical_address_end hw/fsp/fsp-mem-err.c:269:65: got unsigned long long [unsigned] [usertype] paddr_end hw/fsp/fsp-mem-err.c:318:58: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:318:58: expected restricted beint64_t [addressable] [assigned] [usertype] physical_address_start hw/fsp/fsp-mem-err.c:318:58: got unsigned long long [unsigned] [usertype] paddr_start hw/fsp/fsp-mem-err.c:319:56: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:319:56: expected restricted beint64_t [addressable] [assigned] [usertype] physical_address_end hw/fsp/fsp-mem-err.c:319:56: got unsigned long long [unsigned] [usertype] paddr_end Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/fsp/fsp-mem-err.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/fsp/fsp-mem-err.c b/hw/fsp/fsp-mem-err.c
index 1f29a00..a2b0619 100644
--- a/hw/fsp/fsp-mem-err.c
+++ b/hw/fsp/fsp-mem-err.c
@@ -212,7 +212,7 @@ static bool handle_memory_resilience(u32 cmd_sub_mod, u64 paddr)
* For now, send corrected errors to linux and let
* linux handle corrected errors thresholding.
*/
- mem_err_evt.flags |= OPAL_MEM_CORRECTED_ERROR;
+ mem_err_evt.flags |= cpu_to_be16(OPAL_MEM_CORRECTED_ERROR);
mem_err_evt.u.resilience.resil_err_type =
OPAL_MEM_RESILIENCE_CE;
break;
@@ -225,9 +225,9 @@ static bool handle_memory_resilience(u32 cmd_sub_mod, u64 paddr)
OPAL_MEM_RESILIENCE_UE_SCRUB;
break;
}
- mem_err_evt.u.resilience.physical_address_start = paddr;
+ mem_err_evt.u.resilience.physical_address_start = cpu_to_be64(paddr);
mem_err_evt.u.resilience.physical_address_end =
- paddr + MEM_ERR_PAGE_SIZE_4K;
+ cpu_to_be64(paddr + MEM_ERR_PAGE_SIZE_4K);
/* Queue up the event and inform OS about it. */
rc = queue_mem_err_node(&mem_err_evt);
@@ -265,8 +265,8 @@ static bool update_memory_deallocation_event(u64 paddr_start, u64 paddr_end)
found = 1;
if (be64_to_cpu(merr_evt->u.dyn_dealloc.physical_address_end)
< paddr_end)
- merr_evt->u.dyn_dealloc.physical_address_end
- = paddr_end;
+ merr_evt->u.dyn_dealloc.physical_address_end =
+ cpu_to_be64(paddr_end);
break;
}
}
@@ -315,8 +315,8 @@ static bool handle_memory_deallocation(u64 paddr_start, u64 paddr_end)
mem_err_evt.type = OPAL_MEM_ERR_TYPE_DYN_DALLOC;
mem_err_evt.u.dyn_dealloc.dyn_err_type =
OPAL_MEM_DYNAMIC_DEALLOC;
- mem_err_evt.u.dyn_dealloc.physical_address_start = paddr_start;
- mem_err_evt.u.dyn_dealloc.physical_address_end = paddr_end;
+ mem_err_evt.u.dyn_dealloc.physical_address_start = cpu_to_be64(paddr_start);
+ mem_err_evt.u.dyn_dealloc.physical_address_end = cpu_to_be64(paddr_end);
/* Queue up the event and inform OS about it. */
rc = queue_mem_err_node(&mem_err_evt);