diff options
| author | Xichao Zhao <zhao.xichao@vivo.com> | 2026-06-01 01:07:57 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-17 14:54:55 +0200 |
| commit | 768ce60dc8fdea4ce37267d6a6d56193e9e7dc03 (patch) | |
| tree | 7f1ff4ce913f0680e1086378b21df18edf01fdea | |
| parent | 5c3949ef38c86822dd18bef38a0e970052ebc27c (diff) | |
| download | linux-next-768ce60dc8fdea4ce37267d6a6d56193e9e7dc03.tar.gz linux-next-768ce60dc8fdea4ce37267d6a6d56193e9e7dc03.zip | |
accessibility: Use str_plural() to simplify the code
Use the string choice helper function str_plural() to simplify the code.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Link: https://patch.msgid.link/20260531230804.254962-9-samuel.thibault@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/accessibility/speakup/kobjects.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/accessibility/speakup/kobjects.c b/drivers/accessibility/speakup/kobjects.c index 9ff7a4c680db..a73b478e06de 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); } } |
