* libfdt: Remove no longer used code from fdt_node_offset_by_compatible()
@ 2008-02-18 7:09 David Gibson
2008-02-18 14:29 ` Jon Loeliger
0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2008-02-18 7:09 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
Since fdt_node_offset_by_compatible() was converted to the new
fdt_next_node() iterator, a chunk of initialization code became
redundant, but was not removed by oversight. This patch cleans it up.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/libfdt/fdt_ro.c
===================================================================
--- dtc.orig/libfdt/fdt_ro.c 2008-02-18 18:02:01.000000000 +1100
+++ dtc/libfdt/fdt_ro.c 2008-02-18 18:06:33.000000000 +1100
@@ -453,20 +453,10 @@ int fdt_node_check_compatible(const void
int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
const char *compatible)
{
- uint32_t tag;
- int offset, nextoffset;
- int err;
+ int offset, err;
CHECK_HEADER(fdt);
- if (startoffset >= 0) {
- tag = fdt_next_tag(fdt, startoffset, &nextoffset);
- if (tag != FDT_BEGIN_NODE)
- return -FDT_ERR_BADOFFSET;
- } else {
- nextoffset = 0;
- }
-
/* FIXME: The algorithm here is pretty horrible: we scan each
* property of a node in fdt_node_check_compatible(), then if
* that didn't find what we want, we scan over them again
--
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: libfdt: Remove no longer used code from fdt_node_offset_by_compatible()
2008-02-18 7:09 libfdt: Remove no longer used code from fdt_node_offset_by_compatible() David Gibson
@ 2008-02-18 14:29 ` Jon Loeliger
0 siblings, 0 replies; 2+ messages in thread
From: Jon Loeliger @ 2008-02-18 14:29 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
So, like, the other day David Gibson mumbled:
> Since fdt_node_offset_by_compatible() was converted to the new
> fdt_next_node() iterator, a chunk of initialization code became
> redundant, but was not removed by oversight. This patch cleans it up.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied.
jdl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-18 14:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-18 7:09 libfdt: Remove no longer used code from fdt_node_offset_by_compatible() David Gibson
2008-02-18 14:29 ` 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).