* [PATCH] bpf: use str_plural() in diag_print_history()
@ 2026-09-17 20:46 Lalit Shankar Chowdhury
2026-09-18 1:29 ` Alexei Starovoitov
0 siblings, 1 reply; 2+ messages in thread
From: Lalit Shankar Chowdhury @ 2026-09-17 20:46 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Eduard Zingerman, Kumar Kartikeya Dwivedi, Martin KaFai Lau,
Song Liu, Yonghong Song, Jiri Olsa, Emil Tsalapatis,
Ihor Solodrai,
open list:BPF [GENERAL] (Safe Dynamic Programs and Tools),
open list
Cc: Lalit Shankar Chowdhury
Use the string choice helper function to simplify the code.
Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
---
kernel/bpf/diagnostics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/diagnostics.c b/kernel/bpf/diagnostics.c
index 0abbbe177e31..ff139777ac64 100644
--- a/kernel/bpf/diagnostics.c
+++ b/kernel/bpf/diagnostics.c
@@ -2354,6 +2354,6 @@ static void diag_print_history(struct bpf_verifier_env *env,
if (log->first_seq)
diag_write(env, " %llu older causal-history event%s not retained because diagnostic "
"event storage reached capacity\n",
- log->first_seq, log->first_seq == 1 ? "" : "s");
+ log->first_seq, str_plural(log->first_seq));
diag_fmt_restore(env, mark);
}
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] bpf: use str_plural() in diag_print_history()
2026-09-17 20:46 [PATCH] bpf: use str_plural() in diag_print_history() Lalit Shankar Chowdhury
@ 2026-09-18 1:29 ` Alexei Starovoitov
0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2026-09-18 1:29 UTC (permalink / raw)
To: Lalit Shankar Chowdhury, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Eduard Zingerman, Kumar Kartikeya Dwivedi,
Martin KaFai Lau, Song Liu, Yonghong Song, Jiri Olsa,
Emil Tsalapatis, Ihor Solodrai,
open list:BPF [GENERAL] (Safe Dynamic Programs and Tools),
open list
On Thu Sep 17, 2026 at 8:46 PM UTC, Lalit Shankar Chowdhury wrote:
> Use the string choice helper function to simplify the code.
>
> Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
> ---
> kernel/bpf/diagnostics.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/bpf/diagnostics.c b/kernel/bpf/diagnostics.c
> index 0abbbe177e31..ff139777ac64 100644
> --- a/kernel/bpf/diagnostics.c
> +++ b/kernel/bpf/diagnostics.c
> @@ -2354,6 +2354,6 @@ static void diag_print_history(struct bpf_verifier_env *env,
> if (log->first_seq)
> diag_write(env, " %llu older causal-history event%s not retained because diagnostic "
> "event storage reached capacity\n",
> - log->first_seq, log->first_seq == 1 ? "" : "s");
> + log->first_seq, str_plural(log->first_seq));
Nack.
Instead propose a revert of commit 9ca5facd0400f I will be fully
supporitve to delete this obfuscation garbage.
pw-bot: cr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-18 1:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 20:46 [PATCH] bpf: use str_plural() in diag_print_history() Lalit Shankar Chowdhury
2026-09-18 1:29 ` Alexei Starovoitov
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®