[U-Boot] [PATCH 1/5] treewide: include libfdt_env.h before fdt.h
David Gibson
david at gibson.dropbear.id.au
Fri Jan 18 10:48:02 EST 2013
On Thu, Jan 17, 2013 at 11:54:56AM -0600, Kim Phillips wrote:
> On Wed, 16 Jan 2013 18:36:03 -0600
> Scott Wood <scottwood at freescale.com> wrote:
>
> > On 01/16/2013 05:59:04 PM, Kim Phillips wrote:
> > > and, if including libfdt.h which includes libfdt_env.h in
> > > the correct order, don't include fdt.h before libfdt.h.
> > >
> > > this is needed to get the fdt type definitions set from
> > > the project environment before fdt.h uses them.
> > >
> > > Signed-off-by: Kim Phillips <kim.phillips at freescale.com>
> > > Cc: Jerry Van Baren <gvb.uboot at gmail.com>
> >
> > Maybe fdt.h should include libfdt_env.h?
> >
> > Or just always use libfdt.h as the public header.
>
> Was just following along the same lines as the dtc commits 38ad79d3
> "dtc/tests: don't include fdt.h prior to libfdt.h" and 20b866a7
> "dtc/fdtdump: include libfdt_env.h prior to fdt.h", acked by David
> G. I don't know why some only include fdt.h.
>
> devicetree-discuss/David: is there a prescribed way to go here?
> Change all fdt.h includers to just always include libfdt.h instead
> of libfdt_env.h prior to fdt.h?
Yeah, I think just including libfdt.h instead of fdt.h is the way to
go. The distinction is that fdt.h contains only "passive"
declarations. That is, defines and structure/type declarations but no
function prorotypes or other code. In particular that means that it
is strictly about the FDT tree structure only, and not any of the
libfdt specific entry points.
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20130118/f251d1d7/attachment-0001.sig>
More information about the devicetree-discuss
mailing list