On Fri, Jul 9, 2010 at 4:22 PM, Kumar Gala <ga...@kernel.crashing.org> wrote:
> +int fdt_alloc_phandle(void *blob) > +{ > + int offset, len, phandle = 0; > + const u32 *val; > + for (offset = fdt_next_node(blob, -1, NULL); offset >= 0; > + offset = fdt_next_node(blob, offset, NULL)) { > + val = fdt_getprop(blob, offset, "linux,phandle", &len); > + if (val) phandle = max(*val, phandle); > + } > > + return phandle + 1; > +} If you incorporate my patch titled, "libfdt: introduce function fdt_get_max_phandle", you can simplify this function. Wolfgang rejected that patch because I didn't include any code that called fdt_get_max_phandle(). I see you're doing the same thing here with fdt_alloc_phandle(). It will be interesting to see if Wolfgang rejects your patch. -- Timur Tabi Linux kernel developer at Freescale _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot