public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] NAND: cmd_nand.c: fix invalid pointers to static relocated chip names
Date: Mon, 19 Jan 2009 14:29:40 +0100	[thread overview]
Message-ID: <20090119132940.5000D832E425@gemini.denx.de> (raw)
In-Reply-To: <12323711841178-git-send-email-gvv@lstec.com>

Dear Valeriy Glushkov,

In message <12323711841178-git-send-email-gvv@lstec.com> you wrote:
> When U-boot starting from NAND the pointers to chip names are set before relocation.
> If the original memory block is overwritten after relocation that led to invalid
> string data in the nand utility.

This means that the pointers need to be manually relocated.

> -				       i, nand_info[i].name,
> +				       i, nand_info[i].name + gd->reloc_off,

Such relocation shouldbe done exactly once, right after relocation.

Doing this everywhere where the pointers are references is error
prone, ugly and wastes memory.

Please change your patch to fix the pointers. Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We all agree on the necessity of compromise. We just can't agree  on
when it's necessary to compromise."
                - Larry Wall in  <1991Nov13.194420.28091@netlabs.com>

  reply	other threads:[~2009-01-19 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 13:19 [U-Boot] [PATCH] NAND: cmd_nand.c: fix invalid pointers to static relocated chip names Valeriy Glushkov
2009-01-19 13:29 ` Wolfgang Denk [this message]
2009-01-19 14:32   ` [U-Boot] [PATCH v2] nand: Fixed " Valeriy Glushkov
2009-02-06 23:24     ` Scott Wood
  -- strict thread matches above, loose matches on Subject: below --
2009-01-19 13:13 [U-Boot] [PATCH] NAND: cmd_nand.c: fix " gvv at horse.lst.loc
2009-01-19 13:05 ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-19 12:58 gvv at horse.lst.loc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090119132940.5000D832E425@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox