lkml.org 
[lkml]   [2014]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 31/73] module: relocate module_init from init.h to module.h
On 01/21/2014 04:16 PM, Rusty Russell wrote:
> Paul Gortmaker <paul.gortmaker@windriver.com> writes:
>> Modular users will always be users of init functionality, but
>> users of init functionality are not necessarily always modules.
>>
>> Hence any functionality like module_init and module_exit would
>> be more at home in the module.h file. And module.h should
>> explicitly include init.h to make the dependency clear.
>>
>> We've already done all the legwork needed to ensure that this
>> move does not cause any build regressions due to implicit
>> header file include assumptions about where module_init lives.
>>
>> Cc: Rusty Russell <rusty@rustcorp.com.au>
>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>
> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
>
> Want to delete the extraneous semicolons, for bonus points? :)
>
>> +#define module_init(x) __initcall(x);
> ...
>> +#define module_exit(x) __exitcall(x);


There are still around 380 modules that use "module_init(x)" without
a trailing semi-colon. That would make lots of build errors/warnings,
I think. There was also a 2012 patch to fix those and change the
module_init() macro.

What happened there?

ISTR (maybe incorrectly) that Linus once argued for leaving the trailing
semi-colon there (perhaps 8 years ago). who knows?


--
~Randy


\
 
 \ /
  Last update: 2014-01-22 02:21    [W:0.246 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site