lkml.org 
[lkml]   [2020]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] KVM: Remove unecessary asm/kvm_host.h includes
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

\
 
 \ /
  Last update: 2020-02-28 19:28    [W:0.057 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site