Skip to content

Commit 81e4fc6

Browse files
andy-shevBenjamin Tissoires
authored andcommitted
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>
1 parent 1d75460 commit 81e4fc6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

include/linux/string_choices.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ static inline const char *str_read_write(bool v)
3030
{
3131
return v ? "read" : "write";
3232
}
33+
#define str_write_read(v) str_read_write(!(v))
3334

3435
static inline const char *str_on_off(bool v)
3536
{

0 commit comments

Comments
 (0)