]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
lib/string_choices: Rearrange functions in sorted order
authorR Sundar <prosunofficial@gmail.com>
Tue, 19 Nov 2024 02:17:18 +0000 (07:47 +0530)
committerKees Cook <kees@kernel.org>
Mon, 3 Mar 2025 17:35:50 +0000 (09:35 -0800)
Rearrange misplaced functions in sorted order.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: R Sundar <prosunofficial@gmail.com>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Link: https://lore.kernel.org/r/20241119021719.7659-2-prosunofficial@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
include/linux/string_choices.h

index 120ca0f28e9512641d3f142584b7b30640424340..f3ba4f52ff2601f2eb5b974602dd075db2ff5d86 100644 (file)
@@ -41,23 +41,23 @@ static inline const char *str_high_low(bool v)
 }
 #define str_low_high(v)                str_high_low(!(v))
 
-static inline const char *str_read_write(bool v)
-{
-       return v ? "read" : "write";
-}
-#define str_write_read(v)              str_read_write(!(v))
-
 static inline const char *str_on_off(bool v)
 {
        return v ? "on" : "off";
 }
 #define str_off_on(v)          str_on_off(!(v))
 
-static inline const char *str_yes_no(bool v)
+static inline const char *str_read_write(bool v)
 {
-       return v ? "yes" : "no";
+       return v ? "read" : "write";
 }
-#define str_no_yes(v)          str_yes_no(!(v))
+#define str_write_read(v)              str_read_write(!(v))
+
+static inline const char *str_true_false(bool v)
+{
+       return v ? "true" : "false";
+}
+#define str_false_true(v)              str_true_false(!(v))
 
 static inline const char *str_up_down(bool v)
 {
@@ -65,11 +65,11 @@ static inline const char *str_up_down(bool v)
 }
 #define str_down_up(v)         str_up_down(!(v))
 
-static inline const char *str_true_false(bool v)
+static inline const char *str_yes_no(bool v)
 {
-       return v ? "true" : "false";
+       return v ? "yes" : "no";
 }
-#define str_false_true(v)              str_true_false(!(v))
+#define str_no_yes(v)          str_yes_no(!(v))
 
 /**
  * str_plural - Return the simple pluralization based on English counts