Avoid use of divides in print_size
authorNick Thompson <nick.thompson@ge.com>
Tue, 11 May 2010 10:29:52 +0000 (11:29 +0100)
committerWolfgang Denk <wd@denx.de>
Mon, 17 May 2010 21:23:39 +0000 (23:23 +0200)
commitf2d76ae4fdde180e120ea2d29d6ef881360b3cba
treec5627398a3f653f1889e92ce6c5ba2355d9118e5
parenta599cde7698acc5ae3d0f731b4a7d63a931aae63
Avoid use of divides in print_size

Modification of print_size to avoid use of divides and especially
long long divides. Keep the binary scale factor in terms of bit
shifts instead. This should be faster, since the previous code
gave the compiler no clues that the divides where always powers
of two, preventing optimisation.

Signed-off-by: Nick Thompson <nick.thompson@ge.com>
Acked-by: Timur Tabi <timur@freescale.com>
lib/display_options.c