On Tue, Feb 3, 2026 at 8:27 AM Arnd Bergmann <[email protected]> wrote:
>
> From: Arnd Bergmann <[email protected]>
>
> Some internal functions in bpf produce a warning when
> -Wsuggest-attribute=format
> is passed to the compiler, e.g. in 'make W=1':
>
> kernel/trace/bpf_trace.c: In function '____bpf_trace_printk':
> kernel/trace/bpf_trace.c:377:9: error: function '____bpf_trace_printk' might
> be a candidate for 'gnu_printf' format attribute
> [-Werror=suggest-attribute=format]
> 377 | ret = bstr_printf(data.buf, MAX_BPRINTF_BUF, fmt,
> data.bin_args);
> | ^~~
>
> The attribute here is useless since there are no callers from C code,
> but it helps to shut up the output anyway so we can eventually turn
> the warning option on by default.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
This was discussed and it's incorrect.
Commit 7bf819aa992f ("vsnprintf: Mark binary printing functions with
__printf() attribute")
should be reverted instead.
pw-bot: cr