aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/gcov/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gcov/base.c')
-rw-r--r--kernel/gcov/base.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
index 7080ae1eb6c1..2f9df37940a0 100644
--- a/kernel/gcov/base.c
+++ b/kernel/gcov/base.c
@@ -123,11 +123,6 @@ void gcov_enable_events(void)
123} 123}
124 124
125#ifdef CONFIG_MODULES 125#ifdef CONFIG_MODULES
126static inline int within(void *addr, void *start, unsigned long size)
127{
128 return ((addr >= start) && (addr < start + size));
129}
130
131/* Update list and generate events when modules are unloaded. */ 126/* Update list and generate events when modules are unloaded. */
132static int gcov_module_notifier(struct notifier_block *nb, unsigned long event, 127static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
133 void *data) 128 void *data)
@@ -142,7 +137,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
142 137
143 /* Remove entries located in module from linked list. */ 138 /* Remove entries located in module from linked list. */
144 while ((info = gcov_info_next(info))) { 139 while ((info = gcov_info_next(info))) {
145 if (within(info, mod->module_core, mod->core_size)) { 140 if (within_module((unsigned long)info, mod)) {
146 gcov_info_unlink(prev, info); 141 gcov_info_unlink(prev, info);
147 if (gcov_events_enabled) 142 if (gcov_events_enabled)
148 gcov_event(GCOV_REMOVE, info); 143 gcov_event(GCOV_REMOVE, info);