[U-Boot-Users] [RFC/PATCH] fix initdram / use of phys_addr_t

Wolfgang Denk wd at denx.de
Wed Mar 12 21:50:24 CET 2008


Dear Kumar,

in message <96DCB2C0-3028-4A5B-A6F4-5CC3767A5040 at kernel.crashing.org> you wrote:
> 
> would phys_size_t be better?

Yes, definitely much better :-)

> >> +phys_addr_t initdram(int board_type)
> >> {
> >> -	long dram_size = 0;
> >> +	phys_addr_t dram_size = 0;
> >
> > No - initdram() does not return an address, it returns a size.
> 
> Sure, I understand it returns a size.  I was just using phys_addr_t to  
> represent the type for both addresses and sizes.

I think that would be misleading. To me, phys_addr_t looks like a
pointer type, while *_size_t is an (unsigned?) integer type.

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
... bacteriological warfare ... hard to believe we were once foolish
enough to play around with that.
	-- McCoy, "The Omega Glory", stardate unknown




More information about the U-Boot mailing list