Skip to contentSkip to conversation

fix bug in get_ram_size()

PATCH New ratbert.chuang at gmail.com 2 participants 3 messages Jun 28, 2010 – Aug 7, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix bug in get_ram_size()

From: Po-Yu Chuang <[email protected]>

memory content of base address was not restored

---
 common/memsize.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
common/memsize.c +1 -0
index 6c275c9..99469ab 100644
@@ -74,6 +74,7 @@ long get_ram_size(volatile long *base, long maxsize)
 		return (0);
 	}
 
+	*addr = save[i];
 	for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
 		addr = base + cnt;	/* pointer arith! */
 		val = *addr;
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 fix bug in get_ram_size()

Dear Wolfgang,

2010/6/28 <[email protected]>:

Quoted 19 lines

From: Po-Yu Chuang <[email protected]>

memory content of base address was not restored

---
?common/memsize.c | ? ?1 +
?1 files changed, 1 insertions(+), 0 deletions(-)

common/memsize.c +1 -0
index 6c275c9..99469ab 100644
@@ -74,6 +74,7 @@ long get_ram_size(volatile long *base, long maxsize)
 ? ? ? ? ? ? ? ?return (0);
 ? ? ? ?}
 
+ ? ? ? *addr = save[i];
 ? ? ? ?for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
Quoted 2 lines

? ? ? ? ? ? ? ?addr = base + cnt; ? ? ?/* pointer arith! */ ? ? ? ? ? ? ? ?val = *addr;

Did you get this patch?
I think it is quite straightforward.
If you have any concern, please let me know.

regards,
Po-Yu Chuang

#2 lore raw

PATCH 1/1 fix bug in get_ram_size()

Dear Po-Yu Chuang,

Quoted 2 lines · In message <[email protected]> you…

Did you get this patch?

Yes, I did.

Quoted 1 line

I think it is quite straightforward.

Quite straightforward, and incorrect.

Best regards,

Wolfgang Denk

Signature · 5 lines
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
"Love is an ideal thing, marriage a real thing; a  confusion  of  the
real with the ideal never goes unpunished."                  - Goethe