[PATCH] init: Fix for section mismatch in reference from name_to_dev_t().

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marcelo Roberto Jimenez
Date: Thursday, December 16, 2010 - 1:52 pm

This patch fixes the following message while compiling the kernel:

WARNING: init/mounts.o(.text+0x40): Section mismatch in reference from
the function name_to_dev_t() to the function
.init.text:devt_from_partuuid()
The function name_to_dev_t() references
the function __init devt_from_partuuid().
This is often because name_to_dev_t lacks a __init
annotation or the annotation of devt_from_partuuid is wrong.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
---
 init/do_mounts.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index 830aaec..ba48e11 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -133,7 +133,7 @@ done:
  *	bangs.
  */
 
-dev_t name_to_dev_t(char *name)
+dev_t __init name_to_dev_t(char *name)
 {
 	char s[32];
 	char *p;
-- 
1.7.3.2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] init: Fix for section mismatch in reference from n ..., Marcelo Roberto Jimenez, (Thu Dec 16, 1:52 pm)
Re: [PATCH] init: Fix for section mismatch in reference fr ..., Marcelo Roberto Jimenez, (Fri Dec 17, 1:04 am)