* libfdt: libfdt_env.h must be included first
@ 2007-09-28 4:52 David Gibson
2007-09-28 5:13 ` Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: David Gibson @ 2007-09-28 4:52 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
libfdt.h currently includes fdt.h, then libfdt_env.h. This is
incorrect, because depending on the environment into which libfdt is
embedded, libfdt_env.h may be needed to define datatypes used in
fdt.h. This patch corrects the problem.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/libfdt/libfdt.h
===================================================================
--- dtc.orig/libfdt/libfdt.h 2007-09-27 15:23:10.000000000 +1000
+++ dtc/libfdt/libfdt.h 2007-09-27 15:23:50.000000000 +1000
@@ -51,8 +51,8 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <fdt.h>
#include <libfdt_env.h>
+#include <fdt.h>
#define FDT_FIRST_SUPPORTED_VERSION 0x10
#define FDT_LAST_SUPPORTED_VERSION 0x11
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libfdt: libfdt_env.h must be included first
2007-09-28 4:52 libfdt: libfdt_env.h must be included first David Gibson
@ 2007-09-28 5:13 ` Stephen Rothwell
2007-09-28 5:22 ` David Gibson
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2007-09-28 5:13 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
On Fri, 28 Sep 2007 14:52:06 +1000 David Gibson <david@gibson.dropbear.id.au> wrote:
>
> libfdt.h currently includes fdt.h, then libfdt_env.h. This is
> incorrect, because depending on the environment into which libfdt is
> embedded, libfdt_env.h may be needed to define datatypes used in
> fdt.h. This patch corrects the problem.
So why doesn't fdt.h include libfdt_env.h, then?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libfdt: libfdt_env.h must be included first
2007-09-28 5:13 ` Stephen Rothwell
@ 2007-09-28 5:22 ` David Gibson
0 siblings, 0 replies; 5+ messages in thread
From: David Gibson @ 2007-09-28 5:22 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]
On Fri, Sep 28, 2007 at 03:13:22PM +1000, Stephen Rothwell wrote:
> On Fri, 28 Sep 2007 14:52:06 +1000 David Gibson <david@gibson.dropbear.id.au> wrote:
> >
> > libfdt.h currently includes fdt.h, then libfdt_env.h. This is
> > incorrect, because depending on the environment into which libfdt is
> > embedded, libfdt_env.h may be needed to define datatypes used in
> > fdt.h. This patch corrects the problem.
>
> So why doesn't fdt.h include libfdt_env.h, then?
Because libfdt_env.h is specifically for libfdt, whereas fdt.h
contains passive structures only, related to the flat tree structure
but without reference to any particular code for handling it.
Basically, fdt.h includes no other headers as a compromise to make it
more easily usable in various contexts. In fact the only thing it
needs is the C99 fixed-width integer types, but I want it to be also
usable in contexts which don't have a <stdint.h> (e.g. the kernel
bootwrapper).
--
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* libfdt: libfdt_env.h must be included first
@ 2007-10-16 3:50 David Gibson
2007-10-16 12:38 ` Jon Loeliger
0 siblings, 1 reply; 5+ messages in thread
From: David Gibson @ 2007-10-16 3:50 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
libfdt.h currently includes fdt.h, then libfdt_env.h. This is
incorrect, because depending on the environment into which libfdt is
embedded, libfdt_env.h may be needed to define datatypes used in
fdt.h. This patch corrects the problem.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
I've sent this one before, but I guess it got lost in the backlog.
Index: dtc/libfdt/libfdt.h
===================================================================
--- dtc.orig/libfdt/libfdt.h 2007-09-27 15:23:10.000000000 +1000
+++ dtc/libfdt/libfdt.h 2007-09-27 15:23:50.000000000 +1000
@@ -51,8 +51,8 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <fdt.h>
#include <libfdt_env.h>
+#include <fdt.h>
#define FDT_FIRST_SUPPORTED_VERSION 0x10
#define FDT_LAST_SUPPORTED_VERSION 0x11
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libfdt: libfdt_env.h must be included first
2007-10-16 3:50 David Gibson
@ 2007-10-16 12:38 ` Jon Loeliger
0 siblings, 0 replies; 5+ messages in thread
From: Jon Loeliger @ 2007-10-16 12:38 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
So, like, the other day David Gibson mumbled:
> libfdt.h currently includes fdt.h, then libfdt_env.h. This is
> incorrect, because depending on the environment into which libfdt is
> embedded, libfdt_env.h may be needed to define datatypes used in
> fdt.h. This patch corrects the problem.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>
> I've sent this one before, but I guess it got lost in the backlog.
Sorry. There was some froohah around it and I didn't track
where it landed.
Applied.
jdl
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-16 12:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-28 4:52 libfdt: libfdt_env.h must be included first David Gibson
2007-09-28 5:13 ` Stephen Rothwell
2007-09-28 5:22 ` David Gibson
-- strict thread matches above, loose matches on Subject: below --
2007-10-16 3:50 David Gibson
2007-10-16 12:38 ` Jon Loeliger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).