public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	jianjay.zhou@huawei.com
Subject: Re: [PATCH] KVM: Remove unecessary asm/kvm_host.h includes
Date: Fri, 28 Feb 2020 13:27:36 -0500	[thread overview]
Message-ID: <20200228182736.GU180973@xz-x1> (raw)
In-Reply-To: <20200228180503.GH2329@linux.intel.com>

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


      reply	other threads:[~2020-02-28 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 15:55 [PATCH] KVM: Remove unecessary asm/kvm_host.h includes Peter Xu
2020-02-28 18:05 ` Sean Christopherson
2020-02-28 18:27   ` Peter Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200228182736.GU180973@xz-x1 \
    --to=peterx@redhat.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox