Skip to content

Commit b56e601

Browse files
prosun786kees
authored andcommitted
lib/string_choices: Rearrange functions in sorted order
Rearrange misplaced functions in sorted order. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: R Sundar <[email protected]> Reviewed-by: Larysa Zaremba <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
1 parent 1286f63 commit b56e601

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

include/linux/string_choices.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,35 @@ static inline const char *str_high_low(bool v)
4141
}
4242
#define str_low_high(v) str_high_low(!(v))
4343

44-
static inline const char *str_read_write(bool v)
45-
{
46-
return v ? "read" : "write";
47-
}
48-
#define str_write_read(v) str_read_write(!(v))
49-
5044
static inline const char *str_on_off(bool v)
5145
{
5246
return v ? "on" : "off";
5347
}
5448
#define str_off_on(v) str_on_off(!(v))
5549

56-
static inline const char *str_yes_no(bool v)
50+
static inline const char *str_read_write(bool v)
5751
{
58-
return v ? "yes" : "no";
52+
return v ? "read" : "write";
5953
}
60-
#define str_no_yes(v) str_yes_no(!(v))
54+
#define str_write_read(v) str_read_write(!(v))
55+
56+
static inline const char *str_true_false(bool v)
57+
{
58+
return v ? "true" : "false";
59+
}
60+
#define str_false_true(v) str_true_false(!(v))
6161

6262
static inline const char *str_up_down(bool v)
6363
{
6464
return v ? "up" : "down";
6565
}
6666
#define str_down_up(v) str_up_down(!(v))
6767

68-
static inline const char *str_true_false(bool v)
68+
static inline const char *str_yes_no(bool v)
6969
{
70-
return v ? "true" : "false";
70+
return v ? "yes" : "no";
7171
}
72-
#define str_false_true(v) str_true_false(!(v))
72+
#define str_no_yes(v) str_yes_no(!(v))
7373

7474
/**
7575
* str_plural - Return the simple pluralization based on English counts

0 commit comments

Comments
 (0)