Commit 81e4fc67 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Benjamin Tissoires

lib/string_choices: Add str_write_read() helper

Add an inversed variant of str_read_write(), i.e. str_write_read().
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230703185222.50554-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarBenjamin Tissoires <bentiss@kernel.org>
parent 1d754604
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment