Re: [PATCH v2 1/1] x86/reboot: KVM: Guard nmi_shootdown_cpus_on_restart() with ifdeffery

From: Dave Hansen
Date: Fri May 02 2025 - 10:24:48 EST


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.