Skip to content

Commit

Permalink
ARM: s3c24xx: fix multiple section mismatch warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Bergmann committed Oct 7, 2012
1 parent 9e0e4e1 commit 673550a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions arch/arm/mach-s3c24xx/irq-s3c2416.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ struct irq_chip s3c2416_irq_second = {

/* IRQ initialisation code */

static int __init s3c2416_add_sub(unsigned int base,
static int s3c2416_add_sub(unsigned int base,
void (*demux)(unsigned int,
struct irq_desc *),
struct irq_chip *chip,
Expand All @@ -251,7 +251,7 @@ static int __init s3c2416_add_sub(unsigned int base,
return 0;
}

static void __init s3c2416_irq_add_second(void)
static void s3c2416_irq_add_second(void)
{
unsigned long pend;
unsigned long last;
Expand Down Expand Up @@ -287,7 +287,7 @@ static void __init s3c2416_irq_add_second(void)
}
}

static int __init s3c2416_irq_add(struct device *dev,
static int s3c2416_irq_add(struct device *dev,
struct subsys_interface *sif)
{
printk(KERN_INFO "S3C2416: IRQ Support\n");
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c24xx/irq-s3c2443.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static struct irq_chip s3c2443_irq_cam = {

/* IRQ initialisation code */

static int __init s3c2443_add_sub(unsigned int base,
static int s3c2443_add_sub(unsigned int base,
void (*demux)(unsigned int,
struct irq_desc *),
struct irq_chip *chip,
Expand All @@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base,
return 0;
}

static int __init s3c2443_irq_add(struct device *dev,
static int s3c2443_irq_add(struct device *dev,
struct subsys_interface *sif)
{
printk("S3C2443: IRQ Support\n");
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c24xx/simtec-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static struct s3c2410_hcd_info usb_simtec_info __initdata = {
};


int usb_simtec_init(void)
int __init usb_simtec_init(void)
{
int ret;

Expand Down

0 comments on commit 673550a

Please sign in to comment.