Skip to contentSkip to conversation

WARNING: Section mismatches on snd_opti9xx_resume()/snd_opti9xx_configure()

PATCH Takashi Iwai 1 participant 1 message Jul 17, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20120717101238.GA10702@localhost

#1 lore raw

At Tue, 17 Jul 2012 18:12:38 +0800,

Quoted 25 lines · Fengguang Wu

Hi Ondrej,

There are new compile warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
head:   0c7293b6ea0b363c6715c6f0b2894fa63b8e9053
commit: 5dd250728aa4cad49cfa18eb8ed11ba470ce382a [37/38] ALSA: snd-opti9xx: Implement suspend/resume
config: i386-allmodconfig (attached as .config)

All warnings:

WARNING: sound/isa/opti9xx/snd-opti92x-ad1848.o(.text+0x1b2): Section mismatch in reference from the function snd_opti9xx_resume() to the function .devinit.text:snd_opti9xx_configure.isra.2() The function snd_opti9xx_resume() references
the function __devinit snd_opti9xx_configure.isra.2().
This is often because snd_opti9xx_resume lacks a __devinit
annotation or the annotation of snd_opti9xx_configure.isra.2 is wrong.

WARNING: sound/isa/opti9xx/snd-opti92x-cs4231.o(.text+0xb6): Section mismatch in reference from the function snd_opti9xx_resume() to the function .devinit.text:snd_opti9xx_configure() The function snd_opti9xx_resume() references
the function __devinit snd_opti9xx_configure().
This is often because snd_opti9xx_resume lacks a __devinit
annotation or the annotation of snd_opti9xx_configure is wrong.

Quoted 5 lines

WARNING: sound/isa/opti9xx/snd-opti93x.o(.text+0x1ea): Section mismatch in reference from the function snd_opti9xx_resume() to the function .devinit.text:snd_opti9xx_configure() The function snd_opti9xx_resume() references
the function __devinit snd_opti9xx_configure().
This is often because snd_opti9xx_resume lacks a __devinit
annotation or the annotation of snd_opti9xx_configure is wrong.

Fixed now with the patch below. Thanks.

Takashi

---
From: Takashi Iwai <[email protected]>
Subject: [PATCH] ALSA: opti9xx: Fix section mismatch by PM support

In the previous commit, snd_opti9xx_configure() is called from the resume handler but it's still marked as __devinit. Fix it.

---
 sound/isa/opti9xx/opti92x-ad1848.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/isa/opti9xx/opti92x-ad1848.c +1 -1
index d7ce012..f8fbe22 100644
@@ -348,7 +348,7 @@ static void snd_opti9xx_write(struct snd_opti9xx *chip, unsigned char reg,
 		(snd_opti9xx_read(chip, reg) & ~(mask)) | ((value) & (mask)))
 
 
-static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip,
+static int snd_opti9xx_configure(struct snd_opti9xx *chip,
 					   long port,
 					   int irq, int dma1, int dma2,
 					   long mpu_port, int mpu_irq)
Signature · 1 line
1.7.10.4