From: Dmitry Rokosov <DDRokosov@sberdevices.ru>
To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"jic23@kernel.org" <jic23@kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"andriy.shevchenko@linux.intel.com"
<andriy.shevchenko@linux.intel.com>,
"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
"christophe.jaillet@wanadoo.fr" <christophe.jaillet@wanadoo.fr>,
"stano.jakubek@gmail.com" <stano.jakubek@gmail.com>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"stephan@gerhold.net" <stephan@gerhold.net>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"wsa@kernel.org" <wsa@kernel.org>,
"lars@metafoo.de" <lars@metafoo.de>,
"Michael.Hennerich@analog.com" <Michael.Hennerich@analog.com>,
"jbhayana@google.com" <jbhayana@google.com>,
"lucas.demarchi@intel.com" <lucas.demarchi@intel.com>,
"jani.nikula@intel.com" <jani.nikula@intel.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
kernel <kernel@sberdevices.ru>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Dmitry Rokosov <DDRokosov@sberdevices.ru>
Subject: [PATCH v6 1/4] lib/string_helpers: Add str_read_write() helper
Date: Tue, 16 Aug 2022 19:18:43 +0000 [thread overview]
Message-ID: <20220816191842.14020-2-ddrokosov@sberdevices.ru> (raw)
In-Reply-To: <20220816191842.14020-1-ddrokosov@sberdevices.ru>
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Add str_read_write() helper to return 'read' or 'write' string literal.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
---
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.36.0
next prev parent reply other threads:[~2022-08-16 19:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 19:18 [PATCH v6 0/4] iio: accel: add MSA311 accelerometer driver Dmitry Rokosov
2022-08-16 19:18 ` Dmitry Rokosov [this message]
2022-08-16 19:18 ` [PATCH v6 2/4] dt-bindings: vendor-prefixes: add MEMSensing Microsystems Co., Ltd Dmitry Rokosov
2022-08-16 19:18 ` [PATCH v6 3/4] iio: add MEMSensing MSA311 3-axis accelerometer driver Dmitry Rokosov
2022-08-19 8:41 ` Andy Shevchenko
2022-08-19 12:57 ` Dmitry Rokosov
2022-08-19 18:00 ` Jonathan Cameron
2022-08-19 19:02 ` Dmitry Rokosov
2022-08-19 23:23 ` Andy Shevchenko
2022-08-16 19:18 ` [PATCH v6 4/4] dt-bindings: iio: accel: add dt-binding schema for msa311 accel driver Dmitry Rokosov
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=20220816191842.14020-2-ddrokosov@sberdevices.ru \
--to=ddrokosov@sberdevices.ru \
--cc=Michael.Hennerich@analog.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jani.nikula@intel.com \
--cc=jbhayana@google.com \
--cc=jic23@kernel.org \
--cc=kernel@sberdevices.ru \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=stano.jakubek@gmail.com \
--cc=stephan@gerhold.net \
--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