[PATCH 1/4] kvmppc: read device tree hypervisor node infrastructure
Josh Boyer
jwboyer at linux.vnet.ibm.com
Tue Aug 19 21:52:04 EST 2008
On Tue, 2008-08-19 at 12:36 +0200, ehrhardt at linux.vnet.ibm.com wrote:
> diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c
> new file mode 100644
> --- /dev/null
> +++ b/arch/powerpc/kernel/kvm.c
> @@ -0,0 +1,30 @@
> +#include <linux/percpu.h>
> +#include <linux/mm.h>
> +#include <linux/kvm_para.h>
> +
> +void __init kvm_guest_init(void)
> +{
> + if (!kvm_para_available())
> + return;
> +}
This looks really odd. You have a void function that checks the return
value of another function and returns if not true or.. returns if true.
Why bother with the if at all?
One could ask the same about the entire function, but it does look
cleaner to call kvm_guest_init that kvm_para_available directly from
other code.
josh
More information about the Linuxppc-dev
mailing list