From: Wolfgang Denk Date: Fri, 09 Apr 2010 22:10:00 +0200 Subject: [U-Boot] [PATCH] [v3] fix print_size printing fractional gigabyte numbers on 32-bit platforms In-Reply-To: <1269990179-23666-1-git-send-email-timur@freescale.com> References: <1269990179-23666-1-git-send-email-timur@freescale.com> Message-ID: <20100409201000.2ED3E19F36@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Timur Tabi, In message <1269990179-23666-1-git-send-email-timur@freescale.com> you wrote: > In print_size(), the math that calculates the fractional remainder of a number > used the same integer size as a physical address. However, the "10 *" factor > of the algorithm means that a large number (e.g. 1.5GB) can overflow the > integer if we're running on a 32-bit system. Therefore, we need to > disassociate this function from the size of a physical address. > > Signed-off-by: Timur Tabi > --- > lib_generic/display_options.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) Applied, 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 The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." - George Bernard Shaw