mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
373d4d0997
commit
93843b3764
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue