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-Users] [RFC/PATCH] fix initdram / use of phys_addr_t
Date: Wed, 12 Mar 2008 21:50:24 +0100	[thread overview]
Message-ID: <20080312205024.866F3247AF@gemini.denx.de> (raw)
In-Reply-To: Your message of "Wed, 12 Mar 2008 14:09:27 EST." <96DCB2C0-3028-4A5B-A6F4-5CC3767A5040@kernel.crashing.org>

Dear Kumar,

in message <96DCB2C0-3028-4A5B-A6F4-5CC3767A5040@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

  parent reply	other threads:[~2008-03-12 20:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 15:38 [U-Boot-Users] [RFC/PATCH] fix initdram / use of phys_addr_t Kumar Gala
2008-03-12 17:02 ` Jon Loeliger
2008-03-12 18:40 ` Wolfgang Denk
2008-03-12 19:09   ` Kumar Gala
2008-03-12 19:23     ` Jerry Van Baren
2008-03-12 20:52       ` Wolfgang Denk
2008-03-12 20:50     ` Wolfgang Denk [this message]
2008-03-12 22:25 ` Jean-Christophe PLAGNIOL-VILLARD
2008-03-12 23:12   ` Kumar Gala
2008-03-12 23:18     ` Jon Loeliger
2008-03-13  0:06     ` Wolfgang Denk

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=20080312205024.866F3247AF@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