Skip to content

Commit

Permalink
lib/string_choices: Rearrange functions in sorted order
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
prosun786 authored and kees committed Mar 3, 2025
1 parent 1286f63 commit b56e601
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/linux/string_choices.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,35 @@ 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)
{
return v ? "up" : "down";
}
#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
Expand Down

0 comments on commit b56e601

Please sign in to comment.