diff options
author | 2022-02-25 13:44:44 +0000 | |
---|---|---|
committer | 2022-02-25 13:44:44 +0000 | |
commit | db927686e43ffebfc5d1693c1cb4fd74f462d99b (patch) | |
tree | 0cbd82aea0825efc1cb10bad4af664ed1bed9b83 /include/linux/string_helpers.h | |
parent | drm/i915: Check stolen memory size before calling drm_mm_init (diff) | |
parent | Merge tag 'drm-misc-next-2022-02-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-next (diff) | |
download | wireguard-linux-db927686e43ffebfc5d1693c1cb4fd74f462d99b.tar.xz wireguard-linux-db927686e43ffebfc5d1693c1cb4fd74f462d99b.zip |
Merge drm/drm-next into drm-intel-gt-next
Matt needed some buddy allocator changes for landing DG2 small BAR
support patches.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'include/linux/string_helpers.h')
-rw-r--r-- | include/linux/string_helpers.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index 7a22921c9db7..4d72258d42fd 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h @@ -106,4 +106,24 @@ void kfree_strarray(char **array, size_t n); char **devm_kasprintf_strarray(struct device *dev, const char *prefix, size_t n); +static inline const char *str_yes_no(bool v) +{ + return v ? "yes" : "no"; +} + +static inline const char *str_on_off(bool v) +{ + return v ? "on" : "off"; +} + +static inline const char *str_enable_disable(bool v) +{ + return v ? "enable" : "disable"; +} + +static inline const char *str_enabled_disabled(bool v) +{ + return v ? "enabled" : "disabled"; +} + #endif |