From: Andy Shevchenko Date: Mon, 3 Jul 2023 18:52:11 +0000 (+0300) Subject: lib/string_choices: Add str_write_read() helper X-Git-Tag: v6.6.7~2013^2~12^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81e4fc67415607fbd969ff518cc5cbd75e895738;p=platform%2Fkernel%2Flinux-starfive.git lib/string_choices: Add str_write_read() helper Add an inversed variant of str_read_write(), i.e. str_write_read(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230703185222.50554-2-andriy.shevchenko@linux.intel.com Signed-off-by: Benjamin Tissoires --- diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 4812022..3c10919 100644 --- a/include/linux/string_choices.h +++ b/include/linux/string_choices.h @@ -30,6 +30,7 @@ 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) {