Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=78438b36011d8ef7d28ef63a30b11801be1eea71
Commit:     78438b36011d8ef7d28ef63a30b11801be1eea71
Parent:     c8aa72633e65c5c215b0cdd9970642e2a4f9a9a3
Author:     Scott Wood <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 12 14:41:47 2007 -0600
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Tue Mar 13 21:15:52 2007 +1100

    [POWERPC] bootwrapper: Preserve the pp pointer in ft_make_space() when 
calling ft_reorder().
    
    The ft_reorder() function may change the start of the region of interest,
    so the pointer provided by the caller into that region must be fixed up
    to still point to the same datum.
    
    Signed-off-by: Scott Wood <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/flatdevtree.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c
index 6c18773..0fa4f98 100644
--- a/arch/powerpc/boot/flatdevtree.c
+++ b/arch/powerpc/boot/flatdevtree.c
@@ -261,8 +261,14 @@ static int ft_make_space(struct ft_cxt *cxt, char **pp, 
enum ft_rgn_id rgn,
        char *str, *next;
        enum ft_rgn_id r;
 
-       if (!cxt->isordered && !ft_reorder(cxt, nextra))
-               return 0;
+       if (!cxt->isordered) {
+               unsigned long rgn_off = *pp - cxt->rgn[rgn].start;
+
+               if (!ft_reorder(cxt, nextra))
+                       return 0;
+
+               *pp = cxt->rgn[rgn].start + rgn_off;
+       }
        if (ft_shuffle(cxt, pp, rgn, nextra))
                return 1;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to