diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-07-03 21:52:11 +0300 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2023-07-28 18:05:47 +0300 |
commit | 81e4fc67415607fbd969ff518cc5cbd75e895738 (patch) | |
tree | f1abed446ed6ff11a815f952872ad3f4e82c19a3 /include/linux/string_choices.h | |
parent | 1d7546042f8fdc4bc39ab91ec966203e2d64f8bd (diff) | |
download | linux-81e4fc67415607fbd969ff518cc5cbd75e895738.tar.xz |
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 <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230703185222.50554-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'include/linux/string_choices.h')
-rw-r--r-- | include/linux/string_choices.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 48120222b9b2..3c1091941eb8 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) { |