summaryrefslogtreecommitdiffstats
path: root/kernel/gcov
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-11-26 09:43:08 +1030
committerJiri Kosina <jkosina@suse.cz>2015-12-04 22:46:25 +0100
commitc65abf358f211c3f88c8ed714dff25775ab49fc1 (patch)
treeb5631ffa6db131339fd3e9cf3c681dac3df7100c /kernel/gcov
parent20ef10c1b3068f105004e247d8e7dd8120fa4b9a (diff)
downloadlinux-c65abf358f211c3f88c8ed714dff25775ab49fc1.tar.gz
linux-c65abf358f211c3f88c8ed714dff25775ab49fc1.tar.bz2
linux-c65abf358f211c3f88c8ed714dff25775ab49fc1.zip
gcov: use within_module() helper.
An exact mapping would be within_module_core(), but at this stage (MODULE_STATE_GOING) the init section is empty, and this is clearer. Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'kernel/gcov')
-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)
}
#ifdef CONFIG_MODULES
-static inline int within(void *addr, void *start, unsigned long size)
-{
- return ((addr >= start) && (addr < start + size));
-}
-
/* Update list and generate events when modules are unloaded. */
static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
void *data)
@@ -142,7 +137,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
/* Remove entries located in module from linked list. */
while ((info = gcov_info_next(info))) {
- if (within(info, mod->module_core, mod->core_size)) {
+ if (within_module((unsigned long)info, mod)) {
gcov_info_unlink(prev, info);
if (gcov_events_enabled)
gcov_event(GCOV_REMOVE, info);