Skip to content

Commit

Permalink
[PATCH] block/floppy: fix section mismatch warnings
Browse files Browse the repository at this point in the history
In latest -mm a number of section mismatch warnings are generated for
floppy.o like the following:

WARNING: drivers/block/floppy.o - Section mismatch: reference to    \
.init.data: from .text between 'init_module' (at offset 0x6976) and \
'cleanup_module'

The warning are caused by a reference to floppy_init() which is __init from
init_module() which is not declared __init.  Declaring init_module() _init
fixes this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Sam Ravnborg authored and Linus Torvalds committed Mar 25, 2006
1 parent fbd8ad3 commit 1efa646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -4594,7 +4594,7 @@ static void __init parse_floppy_cfg_string(char *cfg)
}
}

int init_module(void)
int __init init_module(void)
{
if (floppy)
parse_floppy_cfg_string(floppy);
Expand Down

0 comments on commit 1efa646

Please sign in to comment.