Re: [patch 10.1/12] Immediate values fixes for modules

Mathieu Desnoyers
2009-09-24T15:33:56Z

Compilation fixes for immediate values when modules are disabled.

Mathieu : merged two fixes.

From: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
include/linux/immediate.h | 1 -
include/linux/module.h | 12 +++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)

Index: linux.trees.git/include/linux/immediate.h
===================================================================
--- linux.trees.git.orig/include/linux/immediate.h 2009-09-24 09:20:37.000000000 -0400
+++ linux.trees.git/include/linux/immediate.h 2009-09-24 10:53:51.000000000 -0400
@@ -75,7 +75,6 @@ extern void imv_unref(struct __imv *begi
#define imv_set(name, i) (name##__imv = (i))

static inline void core_imv_update(void) { }
-static inline void module_imv_update(void) { }
static inline void imv_unref_core_init(void) { }

#endif
Index: linux.trees.git/include/linux/module.h
===================================================================
--- linux.trees.git.orig/include/linux/module.h 2009-09-24 09:20:37.000000000 -0400
+++ linux.trees.git/include/linux/module.h 2009-09-24 10:53:51.000000000 -0400
@@ -538,9 +538,6 @@ extern void print_modules(void);
extern void module_update_tracepoints(void);
extern int module_get_iter_tracepoints(struct tracepoint_iter *iter);

-extern void _module_imv_update(void);
-extern void module_imv_update(void);
-
#else /* !CONFIG_MODULES... */
#define EXPORT_SYMBOL(sym)
#define EXPORT_SYMBOL_GPL(sym)
@@ -661,6 +658,12 @@ static inline int module_get_iter_tracep
return 0;
}

+#endif /* CONFIG_MODULES */
+
+#if defined(CONFIG_MODULES) && defined(CONFIG_IMMEDIATE)
+extern void _module_imv_update(void);
+extern void module_imv_update(void);
+#else
static inline void _module_imv_update(void)
{
}
@@ -668,8 +671,7 @@ static inline void _module_imv_update(vo
static inline void module_imv_update(void)
{
}
-
-#endif /* CONFIG_MODULES */
+#endif

struct device_driver;
#ifdef CONFIG_SYSFS