Add str_up_down() helper to return "up" or "down" string literal.

Signed-off-by: Michal Wajdeczko <[email protected]>
---
Cc: Kees Cook <[email protected]>
Cc: Andy Shevchenko <[email protected]>
---
 include/linux/string_choices.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h
index d9ebe20229f8..bcde3c9cff81 100644
--- a/include/linux/string_choices.h
+++ b/include/linux/string_choices.h
@@ -42,6 +42,11 @@ static inline const char *str_yes_no(bool v)
        return v ? "yes" : "no";
 }
 
+static inline const char *str_up_down(bool v)
+{
+       return v ? "up" : "down";
+}
+
 /**
  * str_plural - Return the simple pluralization based on English counts
  * @num: Number used for deciding pluralization
-- 
2.43.0


Reply via email to