Linux Hardening
 help / color / mirror / Atom feed
From: R Sundar <prosunofficial@gmail.com>
To: Kees Cook <kees@kernel.org>, Andy Shevchenko <andy@kernel.org>
Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
	R Sundar <prosunofficial@gmail.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH v2 linux-next 1/2] lib/string_choices: Rearrange functions in sorted order
Date: Tue, 19 Nov 2024 07:47:18 +0530	[thread overview]
Message-ID: <20241119021719.7659-2-prosunofficial@gmail.com> (raw)
In-Reply-To: <20241119021719.7659-1-prosunofficial@gmail.com>

Rearrange misplaced functions in sorted order.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: R Sundar <prosunofficial@gmail.com>
---
 include/linux/string_choices.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h
index 120ca0f28e95..f3ba4f52ff26 100644
--- a/include/linux/string_choices.h
+++ b/include/linux/string_choices.h
@@ -41,23 +41,23 @@ static inline const char *str_high_low(bool v)
 }
 #define str_low_high(v)		str_high_low(!(v))
 
-static inline const char *str_read_write(bool v)
-{
-	return v ? "read" : "write";
-}
-#define str_write_read(v)		str_read_write(!(v))
-
 static inline const char *str_on_off(bool v)
 {
 	return v ? "on" : "off";
 }
 #define str_off_on(v)		str_on_off(!(v))
 
-static inline const char *str_yes_no(bool v)
+static inline const char *str_read_write(bool v)
 {
-	return v ? "yes" : "no";
+	return v ? "read" : "write";
 }
-#define str_no_yes(v)		str_yes_no(!(v))
+#define str_write_read(v)		str_read_write(!(v))
+
+static inline const char *str_true_false(bool v)
+{
+	return v ? "true" : "false";
+}
+#define str_false_true(v)		str_true_false(!(v))
 
 static inline const char *str_up_down(bool v)
 {
@@ -65,11 +65,11 @@ static inline const char *str_up_down(bool v)
 }
 #define str_down_up(v)		str_up_down(!(v))
 
-static inline const char *str_true_false(bool v)
+static inline const char *str_yes_no(bool v)
 {
-	return v ? "true" : "false";
+	return v ? "yes" : "no";
 }
-#define str_false_true(v)		str_true_false(!(v))
+#define str_no_yes(v)		str_yes_no(!(v))
 
 /**
  * str_plural - Return the simple pluralization based on English counts
-- 
2.34.1


  reply	other threads:[~2024-11-19  2:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19  2:17 [PATCH v2 linux-next 0/2] lib/string_choices: Sorting function order R Sundar
2024-11-19  2:17 ` R Sundar [this message]
2025-01-14 12:33   ` [PATCH v2 linux-next 1/2] lib/string_choices: Rearrange functions in sorted order Larysa Zaremba
2025-01-14 16:03     ` R Sundar
2025-03-03 17:17   ` (subset) " Kees Cook
2024-11-19  2:17 ` [PATCH v2 linux-next 2/2] lib/string_choices: Add str_locked_unlocked()/str_unlocked_locked() helper R Sundar
2024-11-19  8:35 ` [PATCH v2 linux-next 0/2] lib/string_choices: Sorting function order Andy Shevchenko
2025-01-13 15:49 ` 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=20241119021719.7659-2-prosunofficial@gmail.com \
    --to=prosunofficial@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.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