* [PATCH] Remove ft_ordered from flatdevtree.c
@ 2007-05-11 17:49 Becky Bruce
  2007-05-14  0:18 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Becky Bruce @ 2007-05-11 17:49 UTC (permalink / raw)
  To: linuxppc-dev
AFAICT, nobody is using this function, and it causes a build warning
to be generated.  This patch cleans that up by removing the function
and the commented-out code that calls it.
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
---
If anybody has a good reason that this code has been left in, yell!
I'm not *dying* to remove it, but the build warning is annoying.
I've asked around, in email, and on IRC, and not gotten anything
interesting as a response.  If someone wants to keep the code around
for some reason, we can comment it out instead to drop the warning.
 arch/powerpc/boot/flatdevtree.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c
index d00fbd9..eba2ddc 100644
--- a/arch/powerpc/boot/flatdevtree.c
+++ b/arch/powerpc/boot/flatdevtree.c
@@ -134,20 +134,6 @@ static char *ft_next(struct ft_cxt *cxt, char *p, struct ft_atom *ret)
 #define HDR_SIZE	_ALIGN(sizeof(struct boot_param_header), 8)
 #define EXPAND_INCR	1024	/* alloc this much extra when expanding */
 
-/* See if the regions are in the standard order and non-overlapping */
-static int ft_ordered(struct ft_cxt *cxt)
-{
-	char *p = (char *)cxt->bph + HDR_SIZE;
-	enum ft_rgn_id r;
-
-	for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) {
-		if (p > cxt->rgn[r].start)
-			return 0;
-		p = cxt->rgn[r].start + cxt->rgn[r].size;
-	}
-	return p <= (char *)cxt->bph + cxt->max_size;
-}
-
 /* Copy the tree to a newly-allocated region and put things in order */
 static int ft_reorder(struct ft_cxt *cxt, int nextra)
 {
@@ -573,10 +559,6 @@ int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
 	cxt->rgn[FT_STRUCT].size = struct_size(cxt);
 	cxt->rgn[FT_STRINGS].start = blob + be32_to_cpu(bph->off_dt_strings);
 	cxt->rgn[FT_STRINGS].size = be32_to_cpu(bph->dt_strings_size);
-	/* Leave as '0' to force first ft_make_space call to do a ft_reorder
-	 * and move dt to an area allocated by realloc.
-	cxt->isordered = ft_ordered(cxt);
-	*/
 
 	cxt->p = cxt->rgn[FT_STRUCT].start;
 	cxt->str_anchor = cxt->rgn[FT_STRINGS].start;
-- 
1.5.0.3
^ permalink raw reply related	[flat|nested] 2+ messages in thread
* Re: [PATCH] Remove ft_ordered from flatdevtree.c
  2007-05-11 17:49 [PATCH] Remove ft_ordered from flatdevtree.c Becky Bruce
@ 2007-05-14  0:18 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2007-05-14  0:18 UTC (permalink / raw)
  To: Becky Bruce; +Cc: linuxppc-dev
On Fri, May 11, 2007 at 12:49:39PM -0500, Becky Bruce wrote:
> AFAICT, nobody is using this function, and it causes a build warning
> to be generated.  This patch cleans that up by removing the function
> and the commented-out code that calls it.
> 
> Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
-- 
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
end of thread, other threads:[~2007-05-14  0:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11 17:49 [PATCH] Remove ft_ordered from flatdevtree.c Becky Bruce
2007-05-14  0:18 ` David Gibson
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).