diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2023-02-10 07:42:43 +0100 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-03-09 21:55:15 +0100 |
commit | 9e07f161717ab8e8ac1206bf82546511e24cbb7b (patch) | |
tree | f21650b4d1734f53099013aeeba7ce787ff29efa /kernel/module | |
parent | module: replace module_layout with module_memory (diff) | |
download | linux-9e07f161717ab8e8ac1206bf82546511e24cbb7b.tar.xz linux-9e07f161717ab8e8ac1206bf82546511e24cbb7b.zip |
module: Remove the unused function within
The function within is defined in the main.c file, but not called
elsewhere, so remove this unused function.
This routine became no longer used after commit ("module: replace
module_layout with module_memory").
kernel/module/main.c:3007:19: warning: unused function 'within'.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4035
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
[mcgrof: adjust commit log to explain why this change is needed]
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module')
-rw-r--r-- | kernel/module/main.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c index 2724bc1b9a90..1fa529668a45 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2975,11 +2975,6 @@ SYSCALL_DEFINE3(finit_module, int, fd, const char __user *, uargs, int, flags) return load_module(&info, uargs, flags); } -static inline int within(unsigned long addr, void *start, unsigned long size) -{ - return ((void *)addr >= start && (void *)addr < start + size); -} - /* Keep in sync with MODULE_FLAGS_BUF_SIZE !!! */ char *module_flags(struct module *mod, char *buf, bool show_state) { |