]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
module: Remove the unused function within
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 10 Feb 2023 06:42:43 +0000 (14:42 +0800)
committerLuis Chamberlain <mcgrof@kernel.org>
Thu, 9 Mar 2023 20:55:15 +0000 (12:55 -0800)
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>
kernel/module/main.c

index 2724bc1b9a905cdfe7d150763e224a4d02fc91df..1fa529668a453650f71b1c11287adda4fe9b58f7 100644 (file)
@@ -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)
 {