diff options
author | Petr Mladek <pmladek@suse.cz> | 2014-07-26 17:55:01 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-07-27 07:22:44 -0400 |
commit | 76681c8faa07f9e07caa3cc69f235c8719b2a6ea (patch) | |
tree | ab2d3ac380e83e33126412c062192f4afd6668c5 | |
parent | 9b20a352d78a7651aa68a9220f77ccb03009d892 (diff) |
module: return bool from within_module*()
The within_module*() functions return only true or false. Let's use bool as
the return type.
Note that it should not change kABI because these are inline functions.
Signed-off-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | include/linux/module.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 61d8fb2d0873..71f282a4e307 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -396,19 +396,21 @@ bool is_module_address(unsigned long addr); | |||
396 | bool is_module_percpu_address(unsigned long addr); | 396 | bool is_module_percpu_address(unsigned long addr); |
397 | bool is_module_text_address(unsigned long addr); | 397 | bool is_module_text_address(unsigned long addr); |
398 | 398 | ||
399 | static inline int within_module_core(unsigned long addr, const struct module *mod) | 399 | static inline bool within_module_core(unsigned long addr, |
400 | const struct module *mod) | ||
400 | { | 401 | { |
401 | return (unsigned long)mod->module_core <= addr && | 402 | return (unsigned long)mod->module_core <= addr && |
402 | addr < (unsigned long)mod->module_core + mod->core_size; | 403 | addr < (unsigned long)mod->module_core + mod->core_size; |
403 | } | 404 | } |
404 | 405 | ||
405 | static inline int within_module_init(unsigned long addr, const struct module *mod) | 406 | static inline bool within_module_init(unsigned long addr, |
407 | const struct module *mod) | ||
406 | { | 408 | { |
407 | return (unsigned long)mod->module_init <= addr && | 409 | return (unsigned long)mod->module_init <= addr && |
408 | addr < (unsigned long)mod->module_init + mod->init_size; | 410 | addr < (unsigned long)mod->module_init + mod->init_size; |
409 | } | 411 | } |
410 | 412 | ||
411 | static inline int within_module(unsigned long addr, const struct module *mod) | 413 | static inline bool within_module(unsigned long addr, const struct module *mod) |
412 | { | 414 | { |
413 | return within_module_init(addr, mod) || within_module_core(addr, mod); | 415 | return within_module_init(addr, mod) || within_module_core(addr, mod); |
414 | } | 416 | } |