diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-02-12 15:01:48 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-12 18:54:13 -0800 |
commit | 84b9fbedf54a6ea4fba62ef8a167138233586ad3 (patch) | |
tree | 33e86741e9cab9ef7c66817ce54b3d0b49e36dc5 /Kbuild | |
parent | 7eed8fde021b4e169e325e5f50d9f12320668bf2 (diff) | |
download | linux-84b9fbedf54a6ea4fba62ef8a167138233586ad3.tar.gz linux-84b9fbedf54a6ea4fba62ef8a167138233586ad3.tar.bz2 linux-84b9fbedf54a6ea4fba62ef8a167138233586ad3.zip |
lib/string_helpers.c:string_get_size(): use 32 bit arithmetic when possible
The remainder from do_div is always a u32, and after size has been reduced
to be below 1000 (or 1024), it certainly fits in u32. So both remainder
and sf_cap can be made u32s, the format specifiers can be simplified (%lld
wasn't the right thing to use for _unsigned_ long long anyway), and we can
replace a do_div with an ordinary 32/32 bit division.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions