Skip to content

Commit 5b6d8ef

Browse files
tobluxDaniel Thompson
authored andcommitted
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>
1 parent 0bbac3f commit 5b6d8ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/debug/kdb/kdb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,7 @@ static int kdb_summary(int argc, const char **argv)
25172517
if (val.uptime > (24*60*60)) {
25182518
int days = val.uptime / (24*60*60);
25192519
val.uptime %= (24*60*60);
2520-
kdb_printf("%d day%s ", days, days == 1 ? "" : "s");
2520+
kdb_printf("%d day%s ", days, str_plural(days));
25212521
}
25222522
kdb_printf("%02ld:%02ld\n", val.uptime/(60*60), (val.uptime/60)%60);
25232523

0 commit comments

Comments
 (0)