All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: imx-audmux: Fix section mismatch
@ 2014-04-24  6:25 Lars-Peter Clausen
  2014-04-24 10:23 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2014-04-24  6:25 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Fabio Estevam, Sascha Hauer, Lars-Peter Clausen, alsa-devel

audmux_debugfs_init() is marked as __init, but is called from imx_audmux_probe()
which is not marked as __init. This creates a section mismatch and a potential
runtime crash (if imx_audmux_probe() is called after the .init section was
dropped). This patch removes the __init annotation from audmux_debugfs_init(),
which fixes the following warning:
	WARNING: sound/soc/built-in.o(.text+0x86960): Section mismatch in reference
	from the function imx_audmux_probe() to the function
	.init.text:audmux_debugfs_init()

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/fsl/imx-audmux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index ac86993..267717a 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -145,7 +145,7 @@ static const struct file_operations audmux_debugfs_fops = {
 	.llseek = default_llseek,
 };
 
-static void __init audmux_debugfs_init(void)
+static void audmux_debugfs_init(void)
 {
 	int i;
 	char buf[20];
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: imx-audmux: Fix section mismatch
  2014-04-24  6:25 [PATCH] ASoC: imx-audmux: Fix section mismatch Lars-Peter Clausen
@ 2014-04-24 10:23 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-04-24 10:23 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Fabio Estevam, Sascha Hauer, Liam Girdwood, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 445 bytes --]

On Thu, Apr 24, 2014 at 08:25:56AM +0200, Lars-Peter Clausen wrote:
> audmux_debugfs_init() is marked as __init, but is called from imx_audmux_probe()
> which is not marked as __init. This creates a section mismatch and a potential
> runtime crash (if imx_audmux_probe() is called after the .init section was
> dropped). This patch removes the __init annotation from audmux_debugfs_init(),
> which fixes the following warning:

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-24 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24  6:25 [PATCH] ASoC: imx-audmux: Fix section mismatch Lars-Peter Clausen
2014-04-24 10:23 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.