Re: [PATCH v2 1/1] x86/reboot: KVM: Guard nmi_shootdown_cpus_on_restart() with ifdeffery
From: H. Peter Anvin
Date: Fri May 02 2025 - 17:00:17 EST
On May 2, 2025 7:24:37 AM PDT, Dave Hansen <dave.hansen@xxxxxxxxx> 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.
>
__attribute__((unused)) if they don't need to be inlined?