From b2260fb6570cb1c478d3abd2d7c6f4503c53bc39 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Mon, 9 Nov 2015 17:51:27 +1100 Subject: sparse: fix incorrect type warnings in hdata/fsp.c commit 5c3e642911ed217bc476478694281a89fe8ef73c upstream No changes in resulting code as skiboot is BE, but does silence the sparse warnings. hdata/fsp.c:67:9: warning: incorrect type in initializer (different base types) hdata/fsp.c:67:9: expected unsigned int hdata/fsp.c:67:9: got restricted beint16_t const [usertype] hw_version hdata/fsp.c:68:9: warning: incorrect type in initializer (different base types) hdata/fsp.c:68:9: expected unsigned int hdata/fsp.c:68:9: got restricted beint16_t const [usertype] sw_version hdata/fsp.c:103:46: warning: incorrect type in argument 1 (different base types) hdata/fsp.c:103:46: expected unsigned int [unsigned] [usertype] proc_chip_id hdata/fsp.c:103:46: got restricted beint32_t const [usertype] proc_chip_id Signed-off-by: Stewart Smith --- hdata/fsp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hdata/fsp.c b/hdata/fsp.c index a43a622..461e6ea 100644 --- a/hdata/fsp.c +++ b/hdata/fsp.c @@ -65,8 +65,8 @@ static struct dt_node *fsp_create_node(const void *spss, int i, "ibm,fsp2"); dt_add_property_cells(node, "reg-offset", 0xb0011000); } - dt_add_property_cells(node, "hw-version", sp_impl->hw_version); - dt_add_property_cells(node, "sw-version", sp_impl->sw_version); + dt_add_property_cells(node, "hw-version", be16_to_cpu(sp_impl->hw_version)); + dt_add_property_cells(node, "sw-version", be16_to_cpu(sp_impl->sw_version)); if (be16_to_cpu(sp_impl->func_flags) & SPSS_SP_IMPL_FLAGS_PRIMARY) dt_add_property(node, "primary", NULL, 0); @@ -101,7 +101,7 @@ static uint32_t fsp_create_link(const struct spss_iopath *iopath, int index, prlog(PR_DEBUG, "FSP #%d: IO PATH %d is %s PSI Link, GXHB at %llx\n", fsp_index, index, ststr, (long long)be64_to_cpu(iopath->psi.gxhb_base)); - chip_id = pcid_to_chip_id(iopath->psi.proc_chip_id); + chip_id = pcid_to_chip_id(be32_to_cpu(iopath->psi.proc_chip_id)); node = dt_find_compatible_node_on_chip(dt_root, NULL, "ibm,psihb-x", chip_id); if (!node) { -- cgit v1.1