diff options
author | 2017-03-06 12:08:53 +1100 | |
---|---|---|
committer | 2017-03-06 12:08:53 +1100 | |
commit | bad5b28049e5e0562a8ad91797fb77953a53fa20 (patch) | |
tree | d58515b0213f4d1ce2d4012dd19070dc629f5c3d /tests/subnode_iterate.c | |
parent | 672ac09ea04d998dfddfdef3070a8af8d480182b (diff) |
Fix assorted sparse warnings
This fixes a great many sparse warnings on the fdt and libfdt sources.
These are mostly due to incorrect mixing of endian annotated and native
integer types.
This includes fixing a couple of quasi-bugs where we had endian conversions
the wrong way around (this will have the right effect in practice, but is
certainly conceptually incorrect).
This doesn't make the whole tree sparse clean: there are many warnings in
bison and lex generated code, and there are a handful of other remaining
warnings that are (for now) more trouble than they're worth to fix (and
are not genuine bugs).
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/subnode_iterate.c')
-rw-r--r-- | tests/subnode_iterate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/subnode_iterate.c b/tests/subnode_iterate.c index 0fb5c90..7be5706 100644 --- a/tests/subnode_iterate.c +++ b/tests/subnode_iterate.c @@ -33,7 +33,7 @@ static void test_node(void *fdt, int parent_offset) { - fdt32_t subnodes; + uint32_t subnodes; const fdt32_t *prop; int offset; int count; @@ -45,7 +45,7 @@ static void test_node(void *fdt, int parent_offset) FAIL("Missing/invalid subnodes property at '%s'", fdt_get_name(fdt, parent_offset, NULL)); } - subnodes = cpu_to_fdt32(*prop); + subnodes = fdt32_to_cpu(*prop); count = 0; fdt_for_each_subnode(offset, fdt, parent_offset) |