Add str_Y_N() helper to return "Y" or "N" string literal.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto...@renesas.com> --- include/linux/string_choices.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index cc7c771f4e84..615ddbde4743 100644 --- a/include/linux/string_choices.h +++ b/include/linux/string_choices.h @@ -65,6 +65,12 @@ static inline const char *str_yes_no(bool v) } #define str_no_yes(v) str_yes_no(!(v)) +static inline const char *str_Y_N(bool v) +{ + return v ? "Y" : "N"; +} +#define str_N_Y(v) str_Y_N(!(v)) + static inline const char *str_up_down(bool v) { return v ? "up" : "down"; -- 2.43.0