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

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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