History log of /external/dtc/tests/subnode_offset.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
38ad79d33946590c862567c7cbdf25b5a46d8149 14-Nov-2012 Kim Phillips <kim.phillips@freescale.com> dtc/tests: don't include fdt.h prior to libfdt.h

tests will need fdt type definitions provided in a subsequent patch
to libfdt_env.h. Since libfdt.h includes libfdt_env.h in the right
order anyway, just remove the fdt.h include.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/subnode_offset.c
83df28bd39979b32a75656cac291c36dbd4e5497 12-Sep-2011 David Gibson <david@gibson.dropbear.id.au> dtc: Remove gcc 4.6 "set but not used" warnings

A number of the dtc testcases trigger the new "variable set but not
used" warning from gcc 4.6. That is they have variables which are
assigned, but then never read after that point.

In a couple of cases this is just because the variables aren't needed,
so this patch removes them. In subnode_offset.c, it's because one
pair of variables we clearly intended to test we don't actually test.
This patch also adds this missing check.

This patch makes the testsuite compile clean with gcc 4.6.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/subnode_offset.c
f99cd158a9f0b67d3935a08a07dab4f36719fc74 30-Oct-2008 David Gibson <david@gibson.dropbear.id.au> libfdt: Fix bug in fdt_subnode_offset_namelen()

There's currently an off-by-one bug in fdt_subnode_offset_namelen()
which causes it to keep searching after it's finished the subnodes of
the given parent, and into the subnodes of siblings of the original
node which come after it in the tree.

This patch fixes the bug. It also extends the subnode_offset testcase
(updating all of the 'test_tree1' example trees in the process) to
catch it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/subnode_offset.c
01a2d8a3e9f19cb1f5ee923af23682fad783a799 04-Aug-2008 David Gibson <david@gibson.dropbear.id.au> dtc: Make many functions 'static'

This patch marks various functions not shared between c files
'static', as they should be. There are a couple of functions in dtc,
and many in the testsuite.

This is *almost* enough to enable the -Wmissing-prototypes warning.
It's not quite enough, because there's a mess of junk in the flex
generated code which triggers that warning which I'm not yet sure how
to deal with.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/subnode_offset.c
2cf86939aff2692098396e7f25ce299e7195fa12 19-Nov-2007 David Gibson <david@gibson.dropbear.id.au> libfdt: Abolish fdt_offset_ptr_typed()

The fdt_offset_ptr_typed() macro seemed like a good idea at the time.
However, it's not actually used all that often, it can silently throw
away const qualifications and it uses a gcc extension (typeof) which
I'd prefer to avoid for portability.

Therefore, this patch gets rid of it (and the fdt_offset_ptr_typed_w()
variant which was never used at all). It also makes a few variables
const in testcases, which always should have been const, but weren't
caught before because of the aforementioned silent discards.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/subnode_offset.c
9521dc5ecc66c158cd6853cabba2c29f545780f6 20-Nov-2007 David Gibson <david@gibson.dropbear.id.au> libfdt: Abolish _typed() variants, add _cell() variants

In a number of places through libfdt and its tests, we have *_typed()
macro variants on functions which use gcc's typeof and statement
expression extensions to allow passing literals where the underlying
function takes a buffer and size.

These seemed like a good idea at the time, but in fact they have some
problems. They use typeof and statement expressions, extensions I'd
prefer to avoid for portability. Plus, they have potential gotchas -
although they'll deal with the size of the thing passed, they won't
deal with other representation issues (like endianness) and results
could be very strange if the type of the expression passed isn't what
you think it is.

In fact, the only users of these _typed() macros were when the value
passed is a single cell (32-bit integer). Therefore, this patch
removes all these _typed() macros and replaces them with explicit
_cell() variants which handle a single 32-bit integer, and which also
perform endian convesions as appropriate.

With this in place, it now becomes easy to use standardized big-endian
representation for integer valued properties in the testcases,
regardless of the platform we're running on. We therefore do that,
which has the additional advantage that all the example trees created
during a test run are now byte-for-byte identical regardless of
platform.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/subnode_offset.c
d2a9da045897c37071597d9aa473964717b14735 28-Sep-2007 David Gibson <david@gibson.dropbear.id.au> libfdt: Make unit address optional for finding nodes

At present, the fdt_subnode_offset() and fdt_path_offset() functions
in libfdt require the exact name of the nodes in question be passed,
including unit address.

This is contrary to traditional OF-like finddevice() behaviour, which
allows the unit address to be omitted (which is useful when the device
name is unambiguous without the address).

This patch introduces similar behaviour to
fdt_subnode_offset_namelen(), and hence to fdt_subnode_offset() and
fdt_path_offset() which are implemented in terms of the former. The
unit address can be omitted from the given node name. If this is
ambiguous, the first such node in the flattened tree will be selected
(this behaviour is consistent with IEEE1275 which specifies only that
an arbitrary node matching the given information be selected).

This very small change is then followed by many more diffs which
change the test examples and testcases to exercise this behaviour.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
/external/dtc/tests/subnode_offset.c
12578976fe9cef82f0c08db3f9a4f550f5085ba4 14-Jun-2007 David Gibson <dgibson@mulberryst.seuss> Merge libfdt into dtc.

Having pulled the libfdt repository into dtc, merge the makefiles and
testsuites so that they build together usefully.
/external/dtc/tests/subnode_offset.c