diff mbox series

[-next,2/2] lib/string_choices: Add wrapper for str_false_true()

Message ID 20240823062046.3323694-3-lihongbo22@huawei.com (mailing list archive)
State Superseded
Headers show
Series Add str_true_false()/str_false_true() helper | expand

Commit Message

Hongbo Li Aug. 23, 2024, 6:20 a.m. UTC
There are many "false" : "true" format in the kernel tree,
so we add str_false_true() as well.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
---
 include/linux/string_choices.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h
index 7c74497caf2b..ebcc56b28ede 100644
--- a/include/linux/string_choices.h
+++ b/include/linux/string_choices.h
@@ -52,6 +52,7 @@  static inline const char *str_true_false(bool v)
 {
 	return v ? "true" : "false";
 }
+#define str_false_true(v)		str_true_false(!(v))
 
 /**
  * str_plural - Return the simple pluralization based on English counts