Skip to contentSkip to conversation

block/floppy: fix section mismatch warnings

PATCH Sam Ravnborg 1 participant 1 message Feb 26, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---

drivers/block/floppy.c +1 -1
index 65dbc5b..bedb689 100644
@@ -4614,7 +4614,7 @@ static void __init parse_floppy_cfg_stri
 	}
 }
 
-int init_module(void)
+int __init init_module(void)
 {
 	if (floppy)
 		parse_floppy_cfg_string(floppy);