Re: [PATCH] KVM: Remove unecessary asm/kvm_host.h includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 28, 2020 at 10:05:03AM -0800, Sean Christopherson wrote:
> s/unecessary/unnecessary
> 
> On Wed, Feb 26, 2020 at 10:55:58AM -0500, Peter Xu wrote:
> > linux/kvm_host.h and asm/kvm_host.h have a dependency in that the asm
> > header should be included first, then we can define arch-specific
> > macros in asm/ header and use "#ifndef" in linux/ header to define the
> > generic value of the macro.  One example is KVM_MAX_VCPU_ID.
> > 
> > Now in many C files we've got both the headers included, and
> > linux/kvm_host.h is included even earlier.  It's working only because
> > in linux/kvm_host.h we also included asm/kvm_host.h anyway so the
> > explicit inclusion of asm/kvm_host.h in the C files are meaningless.
> 
> I'd prefer to word this much more strongly, i.e. there is no "should"
> about it, including asm/kvm_host.h in linux/kvm_host.h is deliberate, 
> it's not serendipitous.
> 
> ```
> Remove includes of asm/kvm_host.h from files that already include
> linux/kvm_host.h to make it more obvious that there is no ordering issue
> between the two headers.  linux/kvm_host.h includes asm/kvm_host.h to
> pick up architecture specific settings, and this will never change, i.e.
> including asm/kvm_host.h after linux/kvm_host.h may seem problematic,
> but in practice is simply redundant.
> ```
> 
> As for the change itself, I'm indifferent.

Sure, I'll fix up these and repost.  Thanks,

-- 
Peter Xu




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux