From dadec066d8fa7da227f623f632ea114690fecaf8 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Mon, 15 Apr 2019 11:18:33 -0700 Subject: [PATCH] module: add stubs for within_module functions Provide stubs for within_module_core(), within_module_init(), and within_module() to prevent build errors when !CONFIG_MODULES. Suggested-by: Matthew Wilcox Reported-by: Randy Dunlap Reported-by: kbuild test robot Link: https://marc.info/?l=linux-mm&m=155384681109231&w=2 Signed-off-by: Tri Vo Signed-off-by: Jessica Yu --- include/linux/module.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/linux/module.h b/include/linux/module.h index 3abe817..7e63c34 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -710,6 +710,23 @@ static inline bool is_module_text_address(unsigned long addr) return false; } +static inline bool within_module_core(unsigned long addr, + const struct module *mod) +{ + return false; +} + +static inline bool within_module_init(unsigned long addr, + const struct module *mod) +{ + return false; +} + +static inline bool within_module(unsigned long addr, const struct module *mod) +{ + return false; +} + /* Get/put a kernel symbol (calls should be symmetric) */ #define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); }) #define symbol_put(x) do { } while (0) -- 2.7.4