[PATCH v1 2/3] lib/string_helpers: Add str_high_low() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add str_high_low() helper to return 'high' or 'low' string literal.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
 include/linux/string_helpers.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
index 8530c7328269..fd72393e7975 100644
--- a/include/linux/string_helpers.h
+++ b/include/linux/string_helpers.h
@@ -128,6 +128,11 @@ static inline const char *str_enabled_disabled(bool v)
 	return v ? "enabled" : "disabled";
 }
 
+static inline const char *str_high_low(bool v)
+{
+	return v ? "high" : "low";
+}
+
 static inline const char *str_read_write(bool v)
 {
 	return v ? "read" : "write";
-- 
2.35.1




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux