public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* [dtc] Fix flat_dt_property structure
@ 2007-02-26  0:02 David Gibson
  2007-02-27 14:48 ` Jon Loeliger
  0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2007-02-26  0:02 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

The structure in flat_dt.h defining the layout of a proprety within
the flat device tree is incorrect.  It has the offset to the
property's name, then the length when in fact (according to
booting-without-of.txt and the output of dtc) then length should come
first, followed by the name offset.

In fact, this structure is never used so the mistake doesn't break
anything, but it should still be fixed to avoid misleading people.

Signed-off-by: David Gibson <david@gibson•dropbear.id.au>

Index: dtc/flat_dt.h
===================================================================
--- dtc.orig/flat_dt.h	2007-02-26 10:59:03.000000000 +1100
+++ dtc/flat_dt.h	2007-02-26 10:59:45.000000000 +1100
@@ -37,8 +37,8 @@ struct reserve_entry {
 };
 
 struct flat_dt_property {
-	uint32_t nameoff;
 	uint32_t len;
+	uint32_t nameoff;
 	char data[0];
 };
 

-- 
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] 2+ messages in thread

* Re: [dtc] Fix flat_dt_property structure
  2007-02-26  0:02 [dtc] Fix flat_dt_property structure David Gibson
@ 2007-02-27 14:48 ` Jon Loeliger
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Loeliger @ 2007-02-27 14:48 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

So, like, the other day David Gibson mumbled:
> The structure in flat_dt.h defining the layout of a proprety within
> the flat device tree is incorrect.  It has the offset to the
> property's name, then the length when in fact (according to
> booting-without-of.txt and the output of dtc) then length should come
> first, followed by the name offset.
> 
> In fact, this structure is never used so the mistake doesn't break
> anything, but it should still be fixed to avoid misleading people.
> 
> Signed-off-by: David Gibson <david@gibson•dropbear.id.au>

Applied.  Thanks.

jdl

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-27 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-26  0:02 [dtc] Fix flat_dt_property structure David Gibson
2007-02-27 14:48 ` Jon Loeliger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox