mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Larysa Zaremba <larysa.zaremba@intel.com>
To: R Sundar <prosunofficial@gmail.com>
Cc: Kees Cook <kees@kernel.org>, Andy Shevchenko <andy@kernel.org>,
	<linux-hardening@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>
Subject: Re: [PATCH v2 linux-next 1/2] lib/string_choices: Rearrange functions in sorted order
Date: Tue, 14 Jan 2025 13:33:50 +0100	[thread overview]
Message-ID: <Z4ZZroWX80eQGMAT@lzaremba-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <20241119021719.7659-2-prosunofficial@gmail.com>

On Tue, Nov 19, 2024 at 07:47:18AM +0530, R Sundar wrote:
> Rearrange misplaced functions in sorted order.
> 
> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: R Sundar <prosunofficial@gmail.com>

Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>

This is a much-needed patch.

R Sundar,
Can I pick it into my series in case it will not be accepted in the nearest 
future? (I do not promise this, but there is a chance)

> ---
>  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:[~2025-01-14 12:34 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 ` [PATCH v2 linux-next 1/2] lib/string_choices: Rearrange functions in sorted order R Sundar
2025-01-14 12:33   ` Larysa Zaremba [this message]
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=Z4ZZroWX80eQGMAT@lzaremba-mobl.ger.corp.intel.com \
    --to=larysa.zaremba@intel.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 \
    --cc=prosunofficial@gmail.com \
    /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

all inboxes | Powered by JetHome®