[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220703154232.55549-1-andriy.shevchenko@linux.intel.com>
Date: Sun, 3 Jul 2022 18:42:31 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Michael Walle <michael@...le.cc>,
Krzysztof Kozlowski <krzk@...nel.org>,
Sam Protsenko <semen.protsenko@...aro.org>,
Lucas De Marchi <lucas.demarchi@...el.com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org,
linux-renesas-soc@...r.kernel.org
Cc: Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Till Harbaum <till@...baum.org>, Wolfram Sang <wsa@...nel.org>
Subject: [PATCH v2 1/2] lib/string_helpers: Add str_read_write() helper
Add str_read_write() helper to retun 'read' or 'write' string literal.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.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
Powered by blists - more mailing lists