summaryrefslogtreecommitdiff
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2013-01-21 10:47:39 +0400
committerRusty Russell <rusty@rustcorp.com.au>2013-01-21 10:48:20 +0400
commit93843b3764170819aeb07fc867a0499b33a875ca (patch)
treed8fc398faffc1e5a742b272436f70c65ac7b5d8a /include/linux/module.h
parent373d4d099761cb1f637bed488ab3871945882273 (diff)
downloadlinux-93843b3764170819aeb07fc867a0499b33a875ca.tar.xz
module: constify within_module_*
These helper functions just check a set intersection with a range, and don't actually modify struct module. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 1375ee3f03aa..ead1b5719a12 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -396,13 +396,13 @@ bool is_module_address(unsigned long addr);
bool is_module_percpu_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
-static inline int within_module_core(unsigned long addr, struct module *mod)
+static inline int within_module_core(unsigned long addr, const struct module *mod)
{
return (unsigned long)mod->module_core <= addr &&
addr < (unsigned long)mod->module_core + mod->core_size;
}
-static inline int within_module_init(unsigned long addr, struct module *mod)
+static inline int within_module_init(unsigned long addr, const struct module *mod)
{
return (unsigned long)mod->module_init <= addr &&
addr < (unsigned long)mod->module_init + mod->init_size;