On Mon, Nov 28, 2011 at 11:33:22AM -0700, Stephen Warren wrote: > On 11/23/2011 08:54 PM, Simon Glass wrote: > > This fixes three trivial issues in fdtdec.c: > > 1. fdtdec_get_is_enabled() doesn't really need a default value > > 2. The fdt must be word-aligned, since otherwise it will fail on ARM > > 3. The compat_names[] array is missing its first element > > > diff --git a/lib/fdtdec.c b/lib/fdtdec.c > ... > > #define COMPAT(id, name) name > > static const char * const compat_names[COMPAT_COUNT] = { > > + COMPAT(UNKNOWN, "<none>"), > > }; > > Could you educate me on why that change is necessary? Maybe explain this > in the commit description? > > > -int fdtdec_get_is_enabled(const void *blob, int node, int default_val) > > +int fdtdec_get_is_enabled(const void *blob, int node) > > { > > const char *cell; > > > > cell = fdt_getprop(blob, node, "status", NULL); > > if (cell) > > return 0 == strcmp(cell, "ok"); > > - return default_val; > > + return 1; > > } > > Not that this patch changes this, but isn't "okay" also a legal > "enabled" value, and perhaps even the recommended value? See > http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-July/006389.html.
Yes. "okay", not "ok" is the standard value for the status property. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot