diff options
author | Thorsten Blum <thorsten.blum@toblux.com> | 2024-03-28 17:00:17 +0300 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2024-04-22 18:53:19 +0300 |
commit | 5b6d8ef6f056d8130168746c5459d7a3fb494859 (patch) | |
tree | ef5b99bb1059d86ebf767fcdf0c15aa32d5a949c | |
parent | 0bbac3facb5d6cc0171c45c9873a2dc96bea9680 (diff) | |
download | linux-5b6d8ef6f056d8130168746c5459d7a3fb494859.tar.xz |
kdb: Use str_plural() to fix Coccinelle warning
Fixes the following Coccinelle/coccicheck warning reported by
string_choices.cocci:
opportunity for str_plural(days)
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240328140015.388654-3-thorsten.blum@toblux.com
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rw-r--r-- | kernel/debug/kdb/kdb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index d05066cb40b2..664bae55f2c9 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -2517,7 +2517,7 @@ static int kdb_summary(int argc, const char **argv) if (val.uptime > (24*60*60)) { int days = val.uptime / (24*60*60); val.uptime %= (24*60*60); - kdb_printf("%d day%s ", days, days == 1 ? "" : "s"); + kdb_printf("%d day%s ", days, str_plural(days)); } kdb_printf("%02ld:%02ld\n", val.uptime/(60*60), (val.uptime/60)%60); |