Re: [Xen-devel] [PATCH 6/6] xen/xenbus-backend: Only registerdevice if communication ring is local

From: Ian Campbell
Date: Mon Dec 12 2011 - 04:30:35 EST


On Sat, 2011-12-10 at 18:29 +0000, Bastian Blank wrote:
> +/* A flag to determine if xenstored is 'local' */
> +#ifdef CONFIG_XEN_BACKEND
> +static int xenstored_local;
> +#endif

I think this can be __initdata since all the users are __init.

> +#ifdef CONFIG_XEN_BACKEND
> + xenstored_local = 1;

I would push this down into xenstore_local_init() and only set it on
success.

> err = xenstored_local_init();

This is now only called if CONFIG_XEN_BACKEND. You should add a similar
#ifdef around the function definition.

Ian.

> if (err)
> goto out_error;
> +#else
> + BUG();
> +#endif
> }
> xen_store_interface = mfn_to_virt(xen_store_mfn);
> }


--
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/