Re: [PATCH -mm] ALSA portman2x4 section mismatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Jun 2007 12:02:32 +0200 Takashi Iwai wrote:

> At Tue, 26 Jun 2007 15:30:13 -0700,
> Randy Dunlap wrote:
> > 
> > From: Randy Dunlap <[email protected]>
> > 
> > FIx section mismatch when CONFIG_HOTPLUG=n:
> > 
> > WARNING: sound/built-in.o(.exit.text+0x271): Section mismatch: reference to .init.text:snd_p
> > ortman_unregister_all (between 'snd_portman_module_exit' and 'alsa_mpu401_uart_exit')
> > 
> > Signed-off-by: Randy Dunlap <[email protected]>
> 
> I applied it to ALSA tree now because it's the simplest way to fix
> this warning.  But, I'm still wondering whether it was really wrong.
> 
> The function snd_portmap_unregister_all() is called both from the
> module init and exit functions.  Would the module_exit function be
> called even CONFIG_MODULE=n ?

No, it's not called when the driver is built-in.

> If not, __init_or_module should be
> correct since the function is called only from module_init.

[adding Sam to cc:]

I see.  So to try to summarize:

When CONFIG_MODULES=n, __exit functions can be allowed to reference
__init functions since the __init functions won't be called because
the __exit functions are not invoked.

Does that sound correct?  Can & should modpost add this knowledge?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux