public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [RFC/PATCH] fix initdram / use of phys_addr_t
Date: Wed, 12 Mar 2008 15:23:05 -0400	[thread overview]
Message-ID: <47D82D99.3050703@ge.com> (raw)
In-Reply-To: <96DCB2C0-3028-4A5B-A6F4-5CC3767A5040@kernel.crashing.org>

Kumar Gala wrote:
> On Mar 12, 2008, at 1:40 PM, Wolfgang Denk wrote:
> 
>> Dear Kumar,
>>
>> in message <Pine.LNX. 
>> 4.64.0803121037440.13065 at blarg.am.freescale.net> you wrote:
>>> The idea is that initdram() should really have returned a 'unsigned  
>>> long'.
>>> However if we are going to change everyone that has initdram I  
>>> figure we
>>> should make it return a phys_addr_t.
>> Um, no, I don't think so.
> 
> would phys_size_t be 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.
> 
> - k

Shouldn't we just use size_t to return the size of what is effectively 
an array of /n/ bytes of RAM?  (Does size_t's baggage WRT different C 
standards and different C compilers cause more grief than it solves?)

gvb

  reply	other threads:[~2008-03-12 19:23 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 [this message]
2008-03-12 20:52       ` Wolfgang Denk
2008-03-12 20:50     ` Wolfgang Denk
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=47D82D99.3050703@ge.com \
    --to=gerald.vanbaren@ge.com \
    --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