diff options
Diffstat (limited to 'lib/string_helpers.c')
-rw-r--r-- | lib/string_helpers.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/string_helpers.c b/lib/string_helpers.c index 2b3757f84b3b..8f8c4417f228 100644 --- a/lib/string_helpers.c +++ b/lib/string_helpers.c | |||
@@ -20,12 +20,12 @@ | |||
20 | * @len: length of buffer | 20 | * @len: length of buffer |
21 | * | 21 | * |
22 | * This function returns a string formatted to 3 significant figures | 22 | * This function returns a string formatted to 3 significant figures |
23 | * giving the size in the required units. Returns 0 on success or | 23 | * giving the size in the required units. @buf should have room for |
24 | * error on failure. @buf is always zero terminated. | 24 | * at least 9 bytes and will always be zero terminated. |
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | int string_get_size(u64 size, const enum string_size_units units, | 27 | void string_get_size(u64 size, const enum string_size_units units, |
28 | char *buf, int len) | 28 | char *buf, int len) |
29 | { | 29 | { |
30 | static const char *const units_10[] = { | 30 | static const char *const units_10[] = { |
31 | "B", "kB", "MB", "GB", "TB", "PB", "EB" | 31 | "B", "kB", "MB", "GB", "TB", "PB", "EB" |
@@ -67,8 +67,6 @@ int string_get_size(u64 size, const enum string_size_units units, | |||
67 | 67 | ||
68 | snprintf(buf, len, "%u%s %s", (u32)size, | 68 | snprintf(buf, len, "%u%s %s", (u32)size, |
69 | tmp, units_str[units][i]); | 69 | tmp, units_str[units][i]); |
70 | |||
71 | return 0; | ||
72 | } | 70 | } |
73 | EXPORT_SYMBOL(string_get_size); | 71 | EXPORT_SYMBOL(string_get_size); |
74 | 72 | ||