linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Michael Walle <michael@walle.cc>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Till Harbaum <till@harbaum.org>, Wolfram Sang <wsa@kernel.org>
Subject: [PATCH v2 1/2] lib/string_helpers: Add str_read_write() helper
Date: Sun,  3 Jul 2022 18:42:31 +0300	[thread overview]
Message-ID: <20220703154232.55549-1-andriy.shevchenko@linux.intel.com> (raw)

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


             reply	other threads:[~2022-07-03 15:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-03 15:42 Andy Shevchenko [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220703154232.55549-1-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alim.akhtar@samsung.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=codrin.ciubotariu@microchip.com \
    --cc=krzk@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=michael@walle.cc \
    --cc=nicolas.ferre@microchip.com \
    --cc=semen.protsenko@linaro.org \
    --cc=till@harbaum.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).