public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] debugobjects: section mismatch cleanup
@ 2010-03-26 19:38 Henrik Kretzschmar
  2010-03-26 20:54 ` [tip:core/debugobjects] debugobjects: Section " tip-bot for Henrik Kretzschmar
  0 siblings, 1 reply; 2+ messages in thread
From: Henrik Kretzschmar @ 2010-03-26 19:38 UTC (permalink / raw)
  To: tglx, apw, sam
  Cc: linux-kernel, akpm, dwalker, joe, dwalker, rusty, smaclennan,
	khali, peterz, adobriyan, mingo, Henrik Kretzschmar

This patch marks two functions, which only get called at initialization,
as __init.

Here is also interesting, that modpost doesn't catch here the right function
name.

Also does this patch produce 2 false positives for checkpatch.pl.

WARNING: lib/built-in.o(.text+0x585f): Section mismatch in reference
from the function T.506() to the variable .init.data:obj
The function T.506() references
the variable __initdata obj.
This is often because T.506 lacks a __initdata
annotation or the annotation of obj is wrong.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
 lib/debugobjects.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index a9a8996..c4ecd3c 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -773,7 +773,7 @@ static int __init fixup_free(void *addr, enum debug_obj_state state)
 	}
 }
 
-static int
+static int __init
 check_results(void *addr, enum debug_obj_state state, int fixups, int warnings)
 {
 	struct debug_bucket *db;
@@ -916,7 +916,7 @@ void __init debug_objects_early_init(void)
 /*
  * Convert the statically allocated objects to dynamic ones:
  */
-static int debug_objects_replace_static_objects(void)
+static int __init debug_objects_replace_static_objects(void)
 {
 	struct debug_bucket *db = obj_hash;
 	struct hlist_node *node, *tmp;
-- 
1.6.3.3


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

* [tip:core/debugobjects] debugobjects: Section mismatch cleanup
  2010-03-26 19:38 [PATCH] debugobjects: section mismatch cleanup Henrik Kretzschmar
@ 2010-03-26 20:54 ` tip-bot for Henrik Kretzschmar
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Henrik Kretzschmar @ 2010-03-26 20:54 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, henne

Commit-ID:  1fb2f77c037624601fd214fb7c29faa84cd7bdd7
Gitweb:     http://git.kernel.org/tip/1fb2f77c037624601fd214fb7c29faa84cd7bdd7
Author:     Henrik Kretzschmar <henne@nachtwindheim.de>
AuthorDate: Fri, 26 Mar 2010 20:38:35 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 26 Mar 2010 21:52:29 +0100

debugobjects: Section mismatch cleanup

This patch marks two functions, which only get called at
initialization, as __init.

Here is also interesting, that modpost doesn't catch here the right
function name.

WARNING: lib/built-in.o(.text+0x585f): Section mismatch in reference
from the function T.506() to the variable .init.data:obj
The function T.506() references the variable __initdata obj.
This is often because T.506 lacks a __initdata annotation or the 
annotation of obj is wrong.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1269632315-19403-1-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 lib/debugobjects.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index a9a8996..c4ecd3c 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -773,7 +773,7 @@ static int __init fixup_free(void *addr, enum debug_obj_state state)
 	}
 }
 
-static int
+static int __init
 check_results(void *addr, enum debug_obj_state state, int fixups, int warnings)
 {
 	struct debug_bucket *db;
@@ -916,7 +916,7 @@ void __init debug_objects_early_init(void)
 /*
  * Convert the statically allocated objects to dynamic ones:
  */
-static int debug_objects_replace_static_objects(void)
+static int __init debug_objects_replace_static_objects(void)
 {
 	struct debug_bucket *db = obj_hash;
 	struct hlist_node *node, *tmp;

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

end of thread, other threads:[~2010-03-26 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-26 19:38 [PATCH] debugobjects: section mismatch cleanup Henrik Kretzschmar
2010-03-26 20:54 ` [tip:core/debugobjects] debugobjects: Section " tip-bot for Henrik Kretzschmar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox