linux-mips
[Top] [All Lists]

Re: [PATCH v3 1/9] MIPS: KVM: Reformat code and comments

To: linux-mips@linux-mips.org
Subject: Re: [PATCH v3 1/9] MIPS: KVM: Reformat code and comments
From: James Hogan <james.hogan@imgtec.com>
Date: Wed, 25 Jun 2014 00:13:58 +0100
Cc: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>, pbonzini@redhat.com, gleb@kernel.org, kvm@vger.kernel.org, sanjayl@kymasys.com, ralf@linux-mips.org
In-reply-to: <1403631071-6012-2-git-send-email-dengcheng.zhu@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Organization: Imagination Technologies
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1403631071-6012-1-git-send-email-dengcheng.zhu@imgtec.com> <1403631071-6012-2-git-send-email-dengcheng.zhu@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: KMail/4.12.5 (Linux/3.15.1+; KDE/4.12.5; x86_64; ; )
Hi Deng-Cheng,

On Tuesday 24 June 2014 10:31:02 Deng-Cheng Zhu wrote:
> diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c
> index cd5e4f5..821e7e8 100644
> --- a/arch/mips/kvm/kvm_mips.c
> +++ b/arch/mips/kvm/kvm_mips.c

> -#define VCPU_STAT(x) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU
> +#define VCPU_STAT(x) offsetof(struct kvm_vcpu, stat.x)
>  struct kvm_stats_debugfs_item debugfs_entries[] = {
> -     { "wait", VCPU_STAT(wait_exits) },
> -     { "cache", VCPU_STAT(cache_exits) },
> -     { "signal", VCPU_STAT(signal_exits) },
> -     { "interrupt", VCPU_STAT(int_exits) },
> -     { "cop_unsuable", VCPU_STAT(cop_unusable_exits) },
> -     { "tlbmod", VCPU_STAT(tlbmod_exits) },
> -     { "tlbmiss_ld", VCPU_STAT(tlbmiss_ld_exits) },
> -     { "tlbmiss_st", VCPU_STAT(tlbmiss_st_exits) },
> -     { "addrerr_st", VCPU_STAT(addrerr_st_exits) },
> -     { "addrerr_ld", VCPU_STAT(addrerr_ld_exits) },
> -     { "syscall", VCPU_STAT(syscall_exits) },
> -     { "resvd_inst", VCPU_STAT(resvd_inst_exits) },
> -     { "break_inst", VCPU_STAT(break_inst_exits) },
> -     { "flush_dcache", VCPU_STAT(flush_dcache_exits) },
> -     { "halt_wakeup", VCPU_STAT(halt_wakeup) },
> +     { "wait", VCPU_STAT(wait_exits), KVM_STAT_VCPU },
> +     { "cache", VCPU_STAT(cache_exits), KVM_STAT_VCPU },
> +     { "signal", VCPU_STAT(signal_exits), KVM_STAT_VCPU },
> +     { "interrupt", VCPU_STAT(int_exits), KVM_STAT_VCPU },
> +     { "cop_unsuable", VCPU_STAT(cop_unusable_exits), KVM_STAT_VCPU },
> +     { "tlbmod", VCPU_STAT(tlbmod_exits), KVM_STAT_VCPU },
> +     { "tlbmiss_ld", VCPU_STAT(tlbmiss_ld_exits), KVM_STAT_VCPU },
> +     { "tlbmiss_st", VCPU_STAT(tlbmiss_st_exits), KVM_STAT_VCPU },
> +     { "addrerr_st", VCPU_STAT(addrerr_st_exits), KVM_STAT_VCPU },
> +     { "addrerr_ld", VCPU_STAT(addrerr_ld_exits), KVM_STAT_VCPU },
> +     { "syscall", VCPU_STAT(syscall_exits), KVM_STAT_VCPU },
> +     { "resvd_inst", VCPU_STAT(resvd_inst_exits), KVM_STAT_VCPU },
> +     { "break_inst", VCPU_STAT(break_inst_exits), KVM_STAT_VCPU },
> +     { "flush_dcache", VCPU_STAT(flush_dcache_exits), KVM_STAT_VCPU },
> +     { "halt_wakeup", VCPU_STAT(halt_wakeup), KVM_STAT_VCPU },

IMO more important than making checkpatch happy here would be to put it in 
nicely tabulated columns ;-)

> diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c
> index 8d48400..993dd1c 100644
> --- a/arch/mips/kvm/kvm_mips_emul.c
> +++ b/arch/mips/kvm/kvm_mips_emul.c

>       switch (insn.i_format.opcode) {
> -             /*
> -              * jr and jalr are in r_format format.
> -              */
> +              /* jr and jalr are in r_format format. */

bad indentation.

> diff --git a/arch/mips/kvm/kvm_trap_emul.c b/arch/mips/kvm/kvm_trap_emul.c
> index 693f952..baf6577 100644
> --- a/arch/mips/kvm/kvm_trap_emul.c
> +++ b/arch/mips/kvm/kvm_trap_emul.c

> @@ -186,10 +185,12 @@ static int kvm_trap_emul_handle_tlb_ld_miss(struct
> kvm_vcpu *vcpu) vcpu->arch.pc, badvaddr);
> 
>               /* User Address (UA) fault, this could happen if

this comment could be fixed too

Otherwise this patch looks good. Thanks for doing this!

Cheers
James

<Prev in Thread] Current Thread [Next in Thread>