diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-02-12 18:01:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-12 21:54:13 -0500 |
commit | d1214c65c02d503330ce86bd38e344a36599e055 (patch) | |
tree | e07829fc569c35be5860b239ad3e9c4e2b28e6cb /include/linux/string_helpers.h | |
parent | 84b9fbedf54a6ea4fba62ef8a167138233586ad3 (diff) |
libstring_helpers.c:string_get_size(): return void
string_get_size() was documented to return an error, but in fact always
returned 0. Since the output always fits in 9 bytes, just document that
and let callers do what they do now: pass a small stack buffer and ignore
the return value.
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 'include/linux/string_helpers.h')
-rw-r--r-- | include/linux/string_helpers.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index 6eb567ac56bc..657571817260 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h | |||
@@ -10,8 +10,8 @@ enum string_size_units { | |||
10 | STRING_UNITS_2, /* use binary powers of 2^10 */ | 10 | STRING_UNITS_2, /* use binary powers of 2^10 */ |
11 | }; | 11 | }; |
12 | 12 | ||
13 | int string_get_size(u64 size, enum string_size_units units, | 13 | void string_get_size(u64 size, enum string_size_units units, |
14 | char *buf, int len); | 14 | char *buf, int len); |
15 | 15 | ||
16 | #define UNESCAPE_SPACE 0x01 | 16 | #define UNESCAPE_SPACE 0x01 |
17 | #define UNESCAPE_OCTAL 0x02 | 17 | #define UNESCAPE_OCTAL 0x02 |