Re: [PATCH] tracing: remove __printf() attribute on __ftrace_vbprintk()

From: Andy Shevchenko

Date: Tue Feb 03 2026 - 12:19:22 EST


On Tue, Feb 03, 2026 at 04:56:03PM +0100, Arnd Bergmann wrote:
> On Tue, Feb 3, 2026, at 15:58, Andy Shevchenko wrote:
> > On Tue, Feb 03, 2026 at 08:12:57PM +0800, kernel test robot wrote:
> >
> >> kernel test robot noticed the following build warnings:
> >
> > Yeah, you need to go for the full stack of these calls and mark the
> > bottom one with __diag() to avoid these warnings. That's my understanding
> > and what BPF people required. Chasing this one-by-one would produce
> > unneeded churn.
>
> From what I can tell, I can just move the printf attribute
> to the __ftrace_vbprintk() definition to make this bit work.

Ah, that's cool!

...

> There are unrelated warnings for BPF that I managed to
> shut up the same way, doing

BPF rejected such an approach, see lore discussions in the past
(patches from me). Here some pointers (but not all of them):

20251208141618.2805983-1-andriy.shevchenko@xxxxxxxxxxxxxxx
202512090407.VxRO6xAS-lkp@xxxxxxxxx
20251210131234.3185985-1-andriy.shevchenko@xxxxxxxxxxxxxxx
20251216122514.7ee70d5f@xxxxxxxxxxxxxxxx
20251215202430.c35c2d29c4f9ff614d2ab534@xxxxxxxxxxxxxxxxxxxx

--
With Best Regards,
Andy Shevchenko