public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] module: constify within_module_*
@ 2013-01-09 23:09 Sasha Levin
  2013-01-09 23:09 ` [PATCH 2/5] jump label: constify lookup functions Sasha Levin
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Sasha Levin @ 2013-01-09 23:09 UTC (permalink / raw)
  To: tglx, mingo, hpa, rostedt, fweisbec, rusty, ananth,
	anil.s.keshavamurthy, masami.hiramatsu.pt, jbaron
  Cc: x86, linux-kernel, Sasha Levin

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>
---
 include/linux/module.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index 7760c6d..2e5d49e 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;
-- 
1.8.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-01-29 11:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09 23:09 [PATCH 1/5] module: constify within_module_* Sasha Levin
2013-01-09 23:09 ` [PATCH 2/5] jump label: constify lookup functions Sasha Levin
2013-01-15 20:46   ` Sasha Levin
2013-01-15 23:19     ` Steven Rostedt
2013-01-18 21:25   ` Steven Rostedt
2013-01-21  6:51     ` Rusty Russell
2013-01-25  4:15     ` Sasha Levin
2013-01-25 10:16       ` Borislav Petkov
2013-01-25 13:03         ` Steven Rostedt
2013-01-18 21:25   ` Steven Rostedt
2013-01-09 23:09 ` [PATCH 3/5] kprobes: constify check_kprobe_address_safe and friends Sasha Levin
2013-01-21 11:49   ` Masami Hiramatsu
2013-01-25  4:09     ` Sasha Levin
2013-01-29 11:45       ` Masami Hiramatsu
2013-01-09 23:09 ` [PATCH 4/5] alternatives: constify alternatives_text_reserved Sasha Levin
2013-01-21 11:38   ` Masami Hiramatsu
2013-01-09 23:09 ` [PATCH 5/5] ftrace: constify ftrace_text_reserved Sasha Levin
2013-01-10  9:02 ` [PATCH 1/5] module: constify within_module_* Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox