]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/gcov/base.c
gcov: use within_module() helper.
[mirror_ubuntu-bionic-kernel.git] / kernel / gcov / base.c
index 7080ae1eb6c10dbaabe670d6dd038f2aba6b8c31..2f9df37940a0f5a489efc4eaa6afc1ccaa35ad68 100644 (file)
@@ -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);