linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] lib/string_helpers: Add str_read_write() helper
@ 2022-07-03 15:42 Andy Shevchenko
  2022-07-03 15:42 ` [PATCH v2 2/2] i2c: Introduce i2c_str_read_write() and make use of it Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2022-07-03 15:42 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>
---
v2: no changes
 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] 8+ messages in thread

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-03 15:42 [PATCH v2 1/2] lib/string_helpers: Add str_read_write() helper Andy Shevchenko
2022-07-03 15:42 ` [PATCH v2 2/2] i2c: Introduce i2c_str_read_write() and make use of it Andy Shevchenko
2022-07-06 13:06   ` Wolfram Sang
2022-07-08 10:06     ` Andy Shevchenko
2022-07-08 12:00       ` Wolfram Sang
2022-07-08 13:57         ` Andy Shevchenko
2022-07-09 16:06           ` Wolfram Sang
2022-07-09 18:03             ` Andy Shevchenko

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).