Re: [PATCH v1 02/11] backports: extend module_init() module_exit() for built-in

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

 



On Tue, 2014-11-04 at 00:42 -0800, Luis R. Rodriguez wrote:

> +#ifndef MODULE
> +/*
> + * Forcing the backports module to load allows us to easily
> + * identify the backport.
> + */

That comment is wrong really, making the dependency on the symbol forced
the backport module to load but if it's built-in that makes no sense.

> +#undef module_init
> +#define module_init(fn)							\
> +	static int __init __init_backport_##fn(void)			\
> +	{								\
> +		backport_dependency_symbol();				\

That won't do anything at all after all.

> +		return fn();						\
> +	}								\
> +	__initcall(__init_backport_##fn);
> +
> +#undef module_exit
> +#define module_exit(fn)							\
> +	static void __exit __exit_backport_##fn(void)			\
> +	{								\
> +		fn();							\
> +		rcu_barrier();						\
> +	}								\
> +	__exitcall(__exit_backport_##fn);

This is also pointless if it's built-in.

I don't think this patch makes sense, you just want to add the "#ifdef
MODULE" I guess.

johannes


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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux