uboot/lib
Simon Glass 88f95bbadd libfdt: Add fdt_next_subnode() to permit easy subnode iteration
Iterating through subnodes with libfdt is a little painful to write as we
need something like this:

for (depth = 0, count = 0,
	offset = fdt_next_node(fdt, parent_offset, &depth);
     (offset >= 0) && (depth > 0);
     offset = fdt_next_node(fdt, offset, &depth)) {
	if (depth == 1) {
		/* code body */
	}
}

Using fdt_next_subnode() we can instead write this, which is shorter and
easier to get right:

for (offset = fdt_first_subnode(fdt, parent_offset);
     offset >= 0;
     offset = fdt_next_subnode(fdt, offset)) {
	/* code body */
}

Also, it doesn't require two levels of indentation for the loop body.

Signed-off-by: Simon Glass <sjg@chromium.org>
(Cherry-picked from dtc commit 4e76ec79)
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2013-05-14 15:37:25 -04:00
..
libfdt libfdt: Add fdt_next_subnode() to permit easy subnode iteration 2013-05-14 15:37:25 -04:00
lzma
lzo
tizen
zlib
Makefile lib: consolidate hang() 2013-05-01 16:41:08 -04:00
addr_map.c
aes.c
asm-offsets.c
bch.c
bzlib.c
bzlib_crctable.c
bzlib_decompress.c
bzlib_huffman.c
bzlib_private.h
bzlib_randtable.c
circbuf.c
crc7.c
crc16.c
crc32.c crc32: Correct endianness of crc32 result 2013-04-19 10:24:14 -04:00
ctype.c
display_options.c
div64.c
errno.c
fdtdec.c fdt: Skip checking FDT if the pointer is NULL 2013-05-01 11:17:21 -04:00
fdtdec_test.c
gunzip.c
gzip.c
hang.c lib: consolidate hang() 2013-05-01 16:41:08 -04:00
hashtable.c env: throw an error when an empty key is used 2013-05-09 17:03:05 -04:00
initcall.c
ldiv.c
linux_string.c
lmb.c
md5.c
net_utils.c
physmem.c
qsort.c
rand.c
rbtree.c
sha1.c
sha256.c
slre.c Add SLRE - Super Light Regular Expression library 2013-05-01 16:24:00 -04:00
string.c
strmhz.c
time.c
tpm.c tpm: Add TPM command library 2013-04-12 14:13:13 -07:00
uuid.c
vsprintf.c