kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: linmiaohe <linmiaohe@huawei.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com,
	sean.j.christopherson@intel.com, wanpengli@tencent.com,
	jmattson@google.com, joro@8bytes.org, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, hpa@zytor.com
Subject: Re: [PATCH] KVM: x86: Fix print format and coding style
Date: Mon, 17 Feb 2020 09:57:40 +0100	[thread overview]
Message-ID: <87o8txbngb.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <1581734662-970-1-git-send-email-linmiaohe@huawei.com>

linmiaohe <linmiaohe@huawei.com> writes:

> From: Miaohe Lin <linmiaohe@huawei.com>
>
> Use %u to print u32 var and correct some coding style.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  arch/x86/kvm/i8254.c      | 2 +-
>  arch/x86/kvm/mmu/mmu.c    | 3 +--
>  arch/x86/kvm/vmx/nested.c | 2 +-
>  3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
> index b24c606ac04b..febca334c320 100644
> --- a/arch/x86/kvm/i8254.c
> +++ b/arch/x86/kvm/i8254.c
> @@ -367,7 +367,7 @@ static void pit_load_count(struct kvm_pit *pit, int channel, u32 val)
>  {
>  	struct kvm_kpit_state *ps = &pit->pit_state;
>  
> -	pr_debug("load_count val is %d, channel is %d\n", val, channel);
> +	pr_debug("load_count val is %u, channel is %d\n", val, channel);
>  
>  	/*
>  	 * The largest possible initial count is 0; this is equivalent
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 7011a4e54866..9c228b9910b1 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -3568,8 +3568,7 @@ static bool fast_page_fault(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
>  		 * write-protected for dirty-logging or access tracking.
>  		 */
>  		if ((error_code & PFERR_WRITE_MASK) &&
> -		    spte_can_locklessly_be_made_writable(spte))
> -		{
> +		    spte_can_locklessly_be_made_writable(spte)) {
>  			new_spte |= PT_WRITABLE_MASK;
>  
>  			/*
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index f2d8cb68dce8..6f3e515f28fd 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -4367,7 +4367,7 @@ int get_vmx_mem_address(struct kvm_vcpu *vcpu, unsigned long exit_qualification,
>  	if (base_is_valid)
>  		off += kvm_register_read(vcpu, base_reg);
>  	if (index_is_valid)
> -		off += kvm_register_read(vcpu, index_reg)<<scaling;
> +		off += kvm_register_read(vcpu, index_reg) << scaling;
>  	vmx_get_segment(vcpu, &s, seg_reg);
>  
>  	/*

I would've suggested we split such unrelated changes by source files in
the future to simplify (possible) stable backporting. Changes themselves
look good,

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>

-- 
Vitaly


  reply	other threads:[~2020-02-17  8:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15  2:44 [PATCH] KVM: x86: Fix print format and coding style linmiaohe
2020-02-17  8:57 ` Vitaly Kuznetsov [this message]
2020-02-17 17:07   ` Paolo Bonzini
2020-02-17  9:07 linmiaohe

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=87o8txbngb.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).