Re: [tip:x86/cpu] Modify the VMware balloon driver for the new x86_hyper API

From: Dmitry Torokhov
Date: Mon May 10 2010 - 04:06:15 EST


On Sunday 09 May 2010 01:20:44 am H. Peter Anvin wrote:
> On 05/09/2010 01:19 AM, tip-bot for H. Peter Anvin wrote:
> > MODULE_AUTHOR("VMware, Inc.");
> > MODULE_DESCRIPTION("VMware Memory Control (Balloon) Driver");
> >
> > @@ -767,7 +767,7 @@ static int __init vmballoon_init(void)
> >
> > * Check if we are running on VMware's hypervisor and bail out
> > * if we are not.
> > */
> >
> > - if (!vmware_platform())
> > + if (x86_hyper != &x86_hyper_vmware)
> >
> > return -ENODEV;
> >
> > vmballoon_wq = create_freezeable_workqueue("vmmemctl");
>
> Note: I did not change the existing code, but this is an example of a
> very common bug: the appropriate error code for "hardware is not
> present" is ENXIO, not ENODEV.
>

Source please? I was not aware that there was a standard governing
returns code for module init methods.

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/