diff options
author | 2024-03-25 21:11:58 +0100 | |
---|---|---|
committer | 2024-03-25 21:11:58 +0100 | |
commit | 36a1818f5a1e50b805317ba13f827067d50f6970 (patch) | |
tree | b9414b9509bea9f006c292a46a7632ffb57d18ee /include/linux/string_helpers.h | |
parent | dma-buf: Fix NULL pointer dereference in sanitycheck() (diff) | |
parent | Linux 6.9-rc1 (diff) | |
download | wireguard-linux-36a1818f5a1e50b805317ba13f827067d50f6970.tar.xz wireguard-linux-36a1818f5a1e50b805317ba13f827067d50f6970.zip |
Merge drm/drm-fixes into drm-misc-fixes
Backmerging to get drm-misc-fixes to the state of v6.9-rc1.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to '')
-rw-r--r-- | include/linux/string_helpers.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index 58fb1f90eda5..e93fbb5b0c01 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h @@ -17,14 +17,18 @@ static inline bool string_is_terminated(const char *s, int len) return memchr(s, '\0', len) ? true : false; } -/* Descriptions of the types of units to - * print in */ +/* Descriptions of the types of units to print in */ enum string_size_units { STRING_UNITS_10, /* use powers of 10^3 (standard SI) */ STRING_UNITS_2, /* use binary powers of 2^10 */ + STRING_UNITS_MASK = BIT(0), + + /* Modifiers */ + STRING_UNITS_NO_SPACE = BIT(30), + STRING_UNITS_NO_BYTES = BIT(31), }; -int string_get_size(u64 size, u64 blk_size, enum string_size_units units, +int string_get_size(u64 size, u64 blk_size, const enum string_size_units units, char *buf, int len); int parse_int_array_user(const char __user *from, size_t count, int **array); |