Re: [PATCH v2 1/1] x86/reboot: KVM: Guard nmi_shootdown_cpus_on_restart() with ifdeffery
From: Peter Zijlstra
Date: Fri May 02 2025 - 10:31:20 EST
On Fri, May 02, 2025 at 07:24:37AM -0700, Dave Hansen wrote:
> On 5/2/25 07:04, Andy Shevchenko wrote:
> > Can it be applied, please? The problem still persists as of today (v6.15-rc4).
>
> I fundamentally disagree with the idea that the kernel programmer should
> be doing the work of telling the compiler *exactly* when a static inline
> function is unused. Compilers are good at that, humans are not.
>
> The "fixes" for these issues generally make the code worse, not better.
>
> I'd frankly rather have a kernel with some unused 'static inline'
> functions in .c files than one filled with #ifdefs to shut up the compiler.
Yeah, this unused function warning nonsense is terribly annoying :/