|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/4] dtb: correct handling of #address-cells and #size-cells.
On Mon, 2013-02-18 at 13:11 +0000, Stefano Stabellini wrote:
> On Fri, 15 Feb 2013, Ian Campbell wrote:
> > > > > -u32 device_tree_get_u32(const void *fdt, int node, const char
> > > > > *prop_name)
> > > > > +u32 device_tree_get_u32(const void *fdt, int node, const char
> > > > > *prop_name,
> > > > > + u32 dflt)
> > > > > {
> > > > > const struct fdt_property *prop;
> > > > >
> > > > > prop = fdt_get_property(fdt, node, prop_name, NULL);
> > > > > if ( !prop || prop->len < sizeof(u32) )
> > > > > - return 0; /* default to 0 */
> > > > > + return dflt;
> > > > >
> > > > > return fdt32_to_cpu(*(uint32_t*)prop->data);
> > > > > }
> > > >
> > > > where did the vowels go? :)
> > >
> > > Not sure. Unlike me ;-)
> >
> > I remembered when I went to change it, default is a C keyword...
>
> I would have gone for _default, but I am OK with this too.
Technically _default is reserved for the implementation (compiler or
system libraries, I forget which).
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |