Re: [PATCH v6 1/4] KVM: PPC: epapr: Factor out the epapr init

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

 



On 02/23/2012 03:22 AM, Liu Yu wrote:
> +static int __init epapr_paravirt_init(void)
> +{
> +	struct device_node *hyper_node;
> +	const u32 *insts;
> +	int len, i;
> +
> +	hyper_node = of_find_node_by_path("/hypervisor");
> +	if (!hyper_node)
> +		return -ENODEV;
> +
> +	insts = of_get_property(hyper_node, "hcall-instructions", &len);
> +	if (!insts)
> +		return 0;

-ENODEV here too.

> +	if (!(len % 4) && len <= (4 * 4)) {
> +		for (i = 0; i < (len / 4); i++)
> +			patch_instruction(epapr_hypercall_start + i, insts[i]);
> +
> +		epapr_paravirt_enabled = true;
> +	} else {
> +		printk(KERN_WARNING
> +		       "ePAPR paravirt: hcall-instructions format error\n");
> +	}

Do this:

if (error) {
	print error
	return error code
}

continue with function

Not this:

if (!error) {
	continue with function
} else {
	report the error from several lines back
}

> @@ -33,6 +34,14 @@ config KVM_GUEST
>  
>  	  In case of doubt, say Y
>  
> +config EPAPR_PARAVIRT
> +	bool "ePAPR para-virtualization support"
> +	default n
> +	help
> +	  Used to enalbe ePAPR complied para-virtualization support for guest.
> +
> +	  In case of doubt, say Y

s/Used to enalbe/Enable/

s/complied/compliant/ (or just s/complied//)

-Scott

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux