Re: MD Boot patch V1.2 with config support

Harald Hoyer (HarryH@Royal.Net)
Thu, 15 Jan 1998 12:12:02 +0100


Jakub Jelinek wrote:

> Just a comment. You don't need to put the __init in all function prototypes,
> just one is enough (the one where you actually define the function).
> Neither gcc nor binutils need to have some knowledge about the section an
> external function will be in, it is a call all the time.

include/linux/init.h:
* Usage:
* For functions:
* you can surround the whole function declaration
* just before function body into __initfunc() macro, like:
*
* __initfunc (static void initme(int x, int y))
* {
* extern int z; z = x * y;
* }
*
* if the function has a prototype somewhere, you can also add
* __init between closing brace of the prototype and semicolon:
*
* extern int initialize_foobar_device(int, int, int) __init;
*

I don't understand you moaning!
Do you want to save 7 bytes of source code??
To append __init is not a bug nor s.th. useless. It makes the code
more readable, as you immediately can see that this function cannot
be used after initialisation. Think of somebody changing the macros for
__init in include/asm/init.h. There may be future implementations for
__init ....

just wondering,
Harald

-- 
mailto:HarryH@Royal.Net http://hot.spotline.de
http://home.pages.de/~saturn
___________________________________________________________________________
Computers are like air conditioner. Both stop working, if you open
windows.