linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] lib/string_helpers: Add str_read_write() helper
@ 2022-07-02 13:59 Andy Shevchenko
  2022-07-02 13:59 ` [PATCH v1 2/2] i2c: Introduce i2c_str_read_write() and make use of it Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2022-07-02 13:59 UTC (permalink / raw)
  To: Andy Shevchenko, Wolfram Sang, Michael Walle, Krzysztof Kozlowski,
	Sam Protsenko, Lucas De Marchi, linux-i2c, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, linux-renesas-soc
  Cc: Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Krzysztof Kozlowski, Alim Akhtar, Till Harbaum,
	Wolfram Sang

Add str_read_write() helper to retun 'read' or 'write' string literal.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/string_helpers.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
index 4d72258d42fd..9e22cd78f3b8 100644
--- a/include/linux/string_helpers.h
+++ b/include/linux/string_helpers.h
@@ -126,4 +126,9 @@ static inline const char *str_enabled_disabled(bool v)
 	return v ? "enabled" : "disabled";
 }
 
+static inline const char *str_read_write(bool v)
+{
+	return v ? "read" : "write";
+}
+
 #endif
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-04 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-02 13:59 [PATCH v1 1/2] lib/string_helpers: Add str_read_write() helper Andy Shevchenko
2022-07-02 13:59 ` [PATCH v1 2/2] i2c: Introduce i2c_str_read_write() and make use of it Andy Shevchenko
2022-07-02 15:41   ` kernel test robot
2022-07-02 16:12   ` kernel test robot
2022-07-04 10:15   ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).