diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-05-26 22:42:12 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-10-07 04:33:06 -0400 |
commit | 673550a19f01c7955a1321ed9f43a4e2fd9cabf6 (patch) | |
tree | bf32022bb414377e4fb5206627c3e90e0891d240 | |
parent | 9e0e4e11623e57c0f6635f5dc6972244ce511f77 (diff) |
ARM: s3c24xx: fix multiple section mismatch warnings
The *_irq_add function should not be marked __init because the driver
subsystem thinks they might be called at a later stage.
The usb_simtec_init function accesses initdata and should be marked
init. This is safe because the only caller is also an init function.
Without this patch, building s3c2410_defconfig results in:
WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0x1030): Section mismatch in reference from the variable s3c2416_irq_interface to the function .init.text:s3c2416_irq_add()
The variable s3c2416_irq_interface references
the function __init s3c2416_irq_add()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0x1b08): Section mismatch in reference from the variable s3c2443_irq_interface to the function .init.text:s3c2443_irq_add()
The variable s3c2443_irq_interface references
the function __init s3c2443_irq_add()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0xf44): Section mismatch in reference from the variable s3c2416_irq_interface to the function .init.text:s3c2416_irq_add()
The variable s3c2416_irq_interface references
the function __init s3c2416_irq_add()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: arch/arm/mach-s3c24xx/built-in.o(.text+0x3f7c): Section mismatch in reference from the function usb_simtec_init() to the (unknown reference) .init.data:(unknown)
The function usb_simtec_init() references
the (unknown reference) __initdata (unknown).
This is often because usb_simtec_init lacks a __initdata
annotation or the annotation of (unknown) is wrong.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | arch/arm/mach-s3c24xx/irq-s3c2416.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/irq-s3c2443.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/simtec-usb.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-s3c24xx/irq-s3c2416.c b/arch/arm/mach-s3c24xx/irq-s3c2416.c index 23ec97370f32..ff141b0af26b 100644 --- a/arch/arm/mach-s3c24xx/irq-s3c2416.c +++ b/arch/arm/mach-s3c24xx/irq-s3c2416.c | |||
@@ -232,7 +232,7 @@ struct irq_chip s3c2416_irq_second = { | |||
232 | 232 | ||
233 | /* IRQ initialisation code */ | 233 | /* IRQ initialisation code */ |
234 | 234 | ||
235 | static int __init s3c2416_add_sub(unsigned int base, | 235 | static int s3c2416_add_sub(unsigned int base, |
236 | void (*demux)(unsigned int, | 236 | void (*demux)(unsigned int, |
237 | struct irq_desc *), | 237 | struct irq_desc *), |
238 | struct irq_chip *chip, | 238 | struct irq_chip *chip, |
@@ -251,7 +251,7 @@ static int __init s3c2416_add_sub(unsigned int base, | |||
251 | return 0; | 251 | return 0; |
252 | } | 252 | } |
253 | 253 | ||
254 | static void __init s3c2416_irq_add_second(void) | 254 | static void s3c2416_irq_add_second(void) |
255 | { | 255 | { |
256 | unsigned long pend; | 256 | unsigned long pend; |
257 | unsigned long last; | 257 | unsigned long last; |
@@ -287,7 +287,7 @@ static void __init s3c2416_irq_add_second(void) | |||
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
290 | static int __init s3c2416_irq_add(struct device *dev, | 290 | static int s3c2416_irq_add(struct device *dev, |
291 | struct subsys_interface *sif) | 291 | struct subsys_interface *sif) |
292 | { | 292 | { |
293 | printk(KERN_INFO "S3C2416: IRQ Support\n"); | 293 | printk(KERN_INFO "S3C2416: IRQ Support\n"); |
diff --git a/arch/arm/mach-s3c24xx/irq-s3c2443.c b/arch/arm/mach-s3c24xx/irq-s3c2443.c index ac2829f56d12..5e69109c0928 100644 --- a/arch/arm/mach-s3c24xx/irq-s3c2443.c +++ b/arch/arm/mach-s3c24xx/irq-s3c2443.c | |||
@@ -222,7 +222,7 @@ static struct irq_chip s3c2443_irq_cam = { | |||
222 | 222 | ||
223 | /* IRQ initialisation code */ | 223 | /* IRQ initialisation code */ |
224 | 224 | ||
225 | static int __init s3c2443_add_sub(unsigned int base, | 225 | static int s3c2443_add_sub(unsigned int base, |
226 | void (*demux)(unsigned int, | 226 | void (*demux)(unsigned int, |
227 | struct irq_desc *), | 227 | struct irq_desc *), |
228 | struct irq_chip *chip, | 228 | struct irq_chip *chip, |
@@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base, | |||
241 | return 0; | 241 | return 0; |
242 | } | 242 | } |
243 | 243 | ||
244 | static int __init s3c2443_irq_add(struct device *dev, | 244 | static int s3c2443_irq_add(struct device *dev, |
245 | struct subsys_interface *sif) | 245 | struct subsys_interface *sif) |
246 | { | 246 | { |
247 | printk("S3C2443: IRQ Support\n"); | 247 | printk("S3C2443: IRQ Support\n"); |
diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c24xx/simtec-usb.c index d91c1a725139..c303d1b63a86 100644 --- a/arch/arm/mach-s3c24xx/simtec-usb.c +++ b/arch/arm/mach-s3c24xx/simtec-usb.c | |||
@@ -104,7 +104,7 @@ static struct s3c2410_hcd_info usb_simtec_info __initdata = { | |||
104 | }; | 104 | }; |
105 | 105 | ||
106 | 106 | ||
107 | int usb_simtec_init(void) | 107 | int __init usb_simtec_init(void) |
108 | { | 108 | { |
109 | int ret; | 109 | int ret; |
110 | 110 | ||