[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aJRvR9xEkzMix5zQ@begin>
Date: Thu, 7 Aug 2025 11:17:59 +0200
From: Samuel Thibault <samuel.thibault@...-lyon.org>
To: Xichao Zhao <zhao.xichao@...o.com>
Cc: w.d.hubbs@...il.com, chris@...-brannons.com, kirk@...sers.ca,
speakup@...ux-speakup.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] accessibility: Use str_plural() to simplify the code
Xichao Zhao, le jeu. 07 août 2025 16:59:30 +0800, a ecrit:
> Use the string choice helper function str_plural() to simplify the code.
>
> Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
Reviewed-by: Samuel Thibault <samuel.thibault@...-lyon.org>
> ---
> drivers/accessibility/speakup/kobjects.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/accessibility/speakup/kobjects.c b/drivers/accessibility/speakup/kobjects.c
> index 0dfdb6608e02..57139971e997 100644
> --- a/drivers/accessibility/speakup/kobjects.c
> +++ b/drivers/accessibility/speakup/kobjects.c
> @@ -98,7 +98,7 @@ static void report_char_chartab_status(int reset, int received, int used,
> if (rejected)
> snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
> " with %d reject%s\n",
> - rejected, rejected > 1 ? "s" : "");
> + rejected, str_plural(rejected));
> pr_info("%s", buf);
> }
> }
> @@ -740,7 +740,7 @@ static void report_msg_status(int reset, int received, int used,
> if (rejected)
> snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
> " with %d reject%s\n",
> - rejected, rejected > 1 ? "s" : "");
> + rejected, str_plural(rejected));
> pr_info("%s", buf);
> }
> }
> --
> 2.34.1
Powered by blists - more mailing lists