Re: [Xen-devel] [PATCH v2] xen/balloon: don't online new memory initially

From: Jan Beulich
Date: Wed Jul 05 2017 - 11:52:12 EST


>>> On 05.07.17 at 17:38, <jgross@xxxxxxxx> wrote:
> @@ -94,22 +103,15 @@ static struct notifier_block xenstore_notifier = {
> .notifier_call = balloon_init_watcher,
> };
>
> -static int __init balloon_init(void)
> +void __init xen_balloon_init(void)
> {
> - if (!xen_domain())
> - return -ENODEV;
> -
> - pr_info("Initialising balloon driver\n");
> -
> register_balloon(&balloon_dev);
>
> register_xen_selfballooning(&balloon_dev);
>
> register_xenstore_notifier(&xenstore_notifier);
> -
> - return 0;
> }
> -subsys_initcall(balloon_init);
> +EXPORT_SYMBOL_GPL(xen_balloon_init);

I'm sorry for not having paid attention at v1, but __init functions
should not be exported (I would hope for you to actually see a
warning with CONFIG_DEBUG_SECTION_MISMATCH=y).

Jan