Re: [PATCH v2 3/3] PCI: hv: Introduce hv_msi_entry

Thomas Gleixner
2020-02-03T14:42:12Z

Boqun Feng <boqun.feng@gmail.com> writes:
> /*
> diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> index 6b79515abb82..3bdaa3b6e68f 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -240,6 +240,11 @@ bool hv_vcpu_is_preempted(int vcpu);
> static inline void hv_apic_init(void) {}
> #endif
>
> +#define hv_set_msi_address_from_desc(msi_entry, msi_desc) \
> +do { \
> + (msi_entry)->address = (msi_desc)->msg.address_lo; \
> +} while (0)

Any reason why this needs to be a macro? inlines are preferrred. They
are typesafe and readable.

Thanks,

tglx