summaryrefslogtreecommitdiff
path: root/scripts/dtc/libfdt/libfdt.h
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2019-09-05 11:48:47 +0300
committerSimon Glass <sjg@chromium.org>2019-10-15 17:40:02 +0300
commit0ba41ce1b7816c229cc19e0621148b98f990cb68 (patch)
tree449a98e679026e6eaa471331af17a1c0f12d0494 /scripts/dtc/libfdt/libfdt.h
parentce2dae3a44ccc2fe87a9589e3a70ba51885930ab (diff)
downloadu-boot-0ba41ce1b7816c229cc19e0621148b98f990cb68.tar.xz
libfdt: return correct value if #size-cells property is not present
According to the device tree specification, the default value for was not present. This patch also makes fdt_address_cells() and fdt_size_cells() conform to the behaviour documented in libfdt.h. The defaults are only returned if fdt_getprop() returns -FDT_ERR_NOTFOUND, otherwise the actual error is returned. This is based on upstream commit: aa7254d ("libfdt: return correct value if #size-cells property is not present") but misses the test case part, as we don't implement them in U-Boot. Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Diffstat (limited to 'scripts/dtc/libfdt/libfdt.h')
-rw-r--r--scripts/dtc/libfdt/libfdt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h
index 66f01fec53..5c778b115b 100644
--- a/scripts/dtc/libfdt/libfdt.h
+++ b/scripts/dtc/libfdt/libfdt.h
@@ -1109,7 +1109,7 @@ int fdt_address_cells(const void *fdt, int nodeoffset);
*
* returns:
* 0 <= n < FDT_MAX_NCELLS, on success
- * 2, if the node has no #size-cells property
+ * 1, if the node has no #size-cells property
* -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
* #size-cells property
* -FDT_ERR_BADMAGIC,