Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Benjamin Tissoires
81e4fc67 1d754604

+1
+1
include/linux/string_choices.h
··· 30 30 { 31 31 return v ? "read" : "write"; 32 32 } 33 + #define str_write_read(v) str_read_write(!(v)) 33 34 34 35 static inline const char *str_on_off(bool v) 35 36 {