Re: [PATCH v2 2/2] locking/pvqspinlock, hv: Enable PV qspinlock for Hyper-V

From: Thomas Gleixner
Date: Wed Sep 26 2018 - 04:23:52 EST


On Fri, 21 Sep 2018, Yi Sun wrote:
> static inline int hyperv_flush_guest_mapping(u64 as) { return -1; }
> +void __init hv_init_spinlocks(void) {}

That stub want's to be static inline void hv_....

But as the code which uses it is ifdef guarded anyway, you don't need it at
all. We add stub functions to avoid te ifdeffery in the code so the
compiler can optimize them out, but if the ifdef guards are required for
other reasons, then providing the stub for nothing is a pointless exercise.

Thanks,

tglx