<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/string_choices.h, branch v6.16-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>lib/string_choices: Rearrange functions in sorted order</title>
<updated>2025-03-03T17:35:50+00:00</updated>
<author>
<name>R Sundar</name>
<email>prosunofficial@gmail.com</email>
</author>
<published>2024-11-19T02:17:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b56e601afb3fdd0b0c4604a2778e642ababc5414'/>
<id>b56e601afb3fdd0b0c4604a2778e642ababc5414</id>
<content type='text'>
Rearrange misplaced functions in sorted order.

Suggested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: R Sundar &lt;prosunofficial@gmail.com&gt;
Reviewed-by: Larysa Zaremba &lt;larysa.zaremba@intel.com&gt;
Link: https://lore.kernel.org/r/20241119021719.7659-2-prosunofficial@gmail.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rearrange misplaced functions in sorted order.

Suggested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: R Sundar &lt;prosunofficial@gmail.com&gt;
Reviewed-by: Larysa Zaremba &lt;larysa.zaremba@intel.com&gt;
Link: https://lore.kernel.org/r/20241119021719.7659-2-prosunofficial@gmail.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/string_choices: Add some comments to make more clear for string choices helpers.</title>
<updated>2024-09-05T16:50:16+00:00</updated>
<author>
<name>Hongbo Li</name>
<email>lihongbo22@huawei.com</email>
</author>
<published>2024-09-05T09:25:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c121d5cc3a993cdbfab46a152bdd50227a4d5e8c'/>
<id>c121d5cc3a993cdbfab46a152bdd50227a4d5e8c</id>
<content type='text'>
Add some comments to explain why we should use string_choices helpers.

Signed-off-by: Hongbo Li &lt;lihongbo22@huawei.com&gt;
Acked-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://lore.kernel.org/r/20240905092540.2962122-3-lihongbo22@huawei.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add some comments to explain why we should use string_choices helpers.

Signed-off-by: Hongbo Li &lt;lihongbo22@huawei.com&gt;
Acked-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://lore.kernel.org/r/20240905092540.2962122-3-lihongbo22@huawei.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/string_choices: Introduce several opposite string choice helpers</title>
<updated>2024-09-05T16:50:15+00:00</updated>
<author>
<name>Hongbo Li</name>
<email>lihongbo22@huawei.com</email>
</author>
<published>2024-09-05T09:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c2708ba91c3c1fba424b77de83b6fc45cbf38c46'/>
<id>c2708ba91c3c1fba424b77de83b6fc45cbf38c46</id>
<content type='text'>
Similar to the exists helper: str_enable_disable/
str_enabled_disabled/str_on_off/str_yes_no helpers, we can
add the opposite helpers. That's str_disable_enable,
str_disabled_enabled, str_off_on and str_no_yes.

There are more than 10 cases currently (expect
str_disable_enable now has 3 use cases) exist in the code
can be replaced with these helper.

Signed-off-by: Hongbo Li &lt;lihongbo22@huawei.com&gt;
Acked-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://lore.kernel.org/r/20240905092540.2962122-2-lihongbo22@huawei.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to the exists helper: str_enable_disable/
str_enabled_disabled/str_on_off/str_yes_no helpers, we can
add the opposite helpers. That's str_disable_enable,
str_disabled_enabled, str_off_on and str_no_yes.

There are more than 10 cases currently (expect
str_disable_enable now has 3 use cases) exist in the code
can be replaced with these helper.

Signed-off-by: Hongbo Li &lt;lihongbo22@huawei.com&gt;
Acked-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://lore.kernel.org/r/20240905092540.2962122-2-lihongbo22@huawei.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/string_choices: Add str_true_false()/str_false_true() helper</title>
<updated>2024-09-05T16:48:40+00:00</updated>
<author>
<name>Hongbo Li</name>
<email>lihongbo22@huawei.com</email>
</author>
<published>2024-08-27T02:45:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6ff4cd1160afafc12ad1603e3d2f39256e4b708d'/>
<id>6ff4cd1160afafc12ad1603e3d2f39256e4b708d</id>
<content type='text'>
Add str_true_false()/str_false_true() helper to return "true" or
"false" string literal.

Signed-off-by: Hongbo Li &lt;lihongbo22@huawei.com&gt;
Link: https://lore.kernel.org/r/20240827024517.914100-2-lihongbo22@huawei.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add str_true_false()/str_false_true() helper to return "true" or
"false" string literal.

Signed-off-by: Hongbo Li &lt;lihongbo22@huawei.com&gt;
Link: https://lore.kernel.org/r/20240827024517.914100-2-lihongbo22@huawei.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>string_choices: Add wrapper for str_down_up()</title>
<updated>2024-08-15T16:26:02+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2024-08-12T18:29:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f5c1ca3a15fdb867d2b535003f74e0b975eff116'/>
<id>f5c1ca3a15fdb867d2b535003f74e0b975eff116</id>
<content type='text'>
The string choice functions which are not clearly true/false synonyms
also have inverted wrappers. Add this for str_down_up() as well.

Suggested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20240812182939.work.424-kees@kernel.org
Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The string choice functions which are not clearly true/false synonyms
also have inverted wrappers. Add this for str_down_up() as well.

Suggested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20240812182939.work.424-kees@kernel.org
Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/string_choices: Add str_up_down() helper</title>
<updated>2024-08-15T16:26:02+00:00</updated>
<author>
<name>Michal Wajdeczko</name>
<email>michal.wajdeczko@intel.com</email>
</author>
<published>2024-07-25T10:18:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a98ae7f045b29de4f48b191d5aeb4e803183d759'/>
<id>a98ae7f045b29de4f48b191d5aeb4e803183d759</id>
<content type='text'>
Add str_up_down() helper to return "up" or "down" string literal.

Signed-off-by: Michal Wajdeczko &lt;michal.wajdeczko@intel.com&gt;
Link: https://lore.kernel.org/r/20240725101841.574-1-michal.wajdeczko@intel.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add str_up_down() helper to return "up" or "down" string literal.

Signed-off-by: Michal Wajdeczko &lt;michal.wajdeczko@intel.com&gt;
Link: https://lore.kernel.org/r/20240725101841.574-1-michal.wajdeczko@intel.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/string_choices: Add str_plural() helper</title>
<updated>2024-02-29T21:38:01+00:00</updated>
<author>
<name>Michal Wajdeczko</name>
<email>michal.wajdeczko@intel.com</email>
</author>
<published>2024-02-14T16:50:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9ca5facd0400f610f3f7f71aeb7fc0b949a48c67'/>
<id>9ca5facd0400f610f3f7f71aeb7fc0b949a48c67</id>
<content type='text'>
Add str_plural() helper to replace existing open implementations
used by many drivers and help improve future user facing messages.

Signed-off-by: Michal Wajdeczko &lt;michal.wajdeczko@intel.com&gt;
Link: https://lore.kernel.org/r/20240214165015.1656-1-michal.wajdeczko@intel.com
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add str_plural() helper to replace existing open implementations
used by many drivers and help improve future user facing messages.

Signed-off-by: Michal Wajdeczko &lt;michal.wajdeczko@intel.com&gt;
Link: https://lore.kernel.org/r/20240214165015.1656-1-michal.wajdeczko@intel.com
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/string_choices: Add str_write_read() helper</title>
<updated>2023-07-28T15:05:47+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-07-03T18:52:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=81e4fc67415607fbd969ff518cc5cbd75e895738'/>
<id>81e4fc67415607fbd969ff518cc5cbd75e895738</id>
<content type='text'>
Add an inversed variant of str_read_write(), i.e. str_write_read().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230703185222.50554-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an inversed variant of str_read_write(), i.e. str_write_read().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230703185222.50554-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/string_choices: Add str_high_low() helper</title>
<updated>2023-06-12T17:14:22+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-06T19:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a9fc76645ca02a79ab491e2b05e29dc222b1f6b4'/>
<id>a9fc76645ca02a79ab491e2b05e29dc222b1f6b4</id>
<content type='text'>
Add str_high_low() helper to return 'high' or 'low' string literal.
Also add an inversed variant, i.e. str_low_high().

All the same for str_hi_low().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add str_high_low() helper to return 'high' or 'low' string literal.
Also add an inversed variant, i.e. str_low_high().

All the same for str_hi_low().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/string_helpers: Split out string_choices.h</title>
<updated>2023-06-12T17:14:21+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-06T19:55:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fca76071bab2304b379c35674d3b9e36a82e364a'/>
<id>fca76071bab2304b379c35674d3b9e36a82e364a</id>
<content type='text'>
Some users may only need the string choice APIs. Split
the respective header, i.e. string_choices.h. Include
it in the string_helpers.h for backward compatibility.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some users may only need the string choice APIs. Split
the respective header, i.e. string_choices.h. Include
it in the string_helpers.h for backward compatibility.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
