Re: [GIT PULL] tracing: Updates for 7.2
From: Linus Torvalds
Date: Fri Jun 19 2026 - 16:55:44 EST
On Fri, 19 Jun 2026 at 13:28, Thomas Gleixner <tglx@xxxxxxxxxx> wrote:
>
> One thing I'm seeing is that the kernel is patently bad in separating
> data type declarations from actual APIs, where the APIs usually just
> need a forward declaration of the pointer type. Ditto for struct
> declarations with pointer types.
We tend to do a lot of inline functions, and that often makes it
impossible to do the simple "just forward-declare the type".
And often there are fairly good reasons for the inline functions, in
that they tend to be much safer than macros, both for type checking
and for the whole "use argument once" reason (they also avoid compiler
warnings when the argument _isn't_ used).
But yes, it's often really nasty to try to split things up, even when
it *looks* straightforward.
Linus