mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
init.h: document the existence of __initconst
Initdata can be const since more than 5 years, using the __initconst keyword. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
67347fe4e6
commit
65321547c8
@ -26,8 +26,8 @@
|
|||||||
* extern int initialize_foobar_device(int, int, int) __init;
|
* extern int initialize_foobar_device(int, int, int) __init;
|
||||||
*
|
*
|
||||||
* For initialized data:
|
* For initialized data:
|
||||||
* You should insert __initdata between the variable name and equal
|
* You should insert __initdata or __initconst between the variable name
|
||||||
* sign followed by value, e.g.:
|
* and equal sign followed by value, e.g.:
|
||||||
*
|
*
|
||||||
* static int init_variable __initdata = 0;
|
* static int init_variable __initdata = 0;
|
||||||
* static const char linux_logo[] __initconst = { 0x32, 0x36, ... };
|
* static const char linux_logo[] __initconst = { 0x32, 0x36, ... };
|
||||||
@ -35,8 +35,6 @@
|
|||||||
* Don't forget to initialize data not at file scope, i.e. within a function,
|
* Don't forget to initialize data not at file scope, i.e. within a function,
|
||||||
* as gcc otherwise puts the data into the bss section and not into the init
|
* as gcc otherwise puts the data into the bss section and not into the init
|
||||||
* section.
|
* section.
|
||||||
*
|
|
||||||
* Also note, that this data cannot be "const".
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* These are for everybody (although not all archs will actually
|
/* These are for everybody (although not all archs will actually
|
||||||
|
Loading…
Reference in New Issue
Block a user