From: Tri Vo Date: Mon, 15 Apr 2019 18:18:33 +0000 (-0700) Subject: module: add stubs for within_module functions X-Git-Tag: v5.15~6365^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dadec066d8fa7da227f623f632ea114690fecaf8;p=platform%2Fkernel%2Flinux-starfive.git 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 --- 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)