]> git.baikalelectronics.ru Git - kernel.git/commit
lib/string_helpers.c:string_get_size(): remove redundant prefixes
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 12 Feb 2015 23:01:45 +0000 (15:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Feb 2015 02:54:13 +0000 (18:54 -0800)
commit87c35c920d54ab328dbfff6d39f168f266cf6730
tree17b2014d7c97facc7def41b76d173f48a81489d5
parentf71bd9ac0a7f4bddffe1866512a1339e3547fc8b
lib/string_helpers.c:string_get_size(): remove redundant prefixes

While commit 2fa96af04983 ("[SCSI] lib: add generic helper to print
sizes rounded to the correct SI range") says that Z and Y are included
in preparation for 128 bit computers, they just waste .text currently.
If and when we get u128, string_get_size needs updating anyway (and ISO
needs to come up with four more prefixes).

Also there's no need to include and test for the NULL sentinel; once we
reach "E" size is at most 18.  [The test is also wrong; it should be
units_str[units][i+1]; if we've reached NULL we're already doomed.]

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/string_helpers.c