Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74831476 authored by Tri Vo's avatar Tri Vo Committed by Tri Vo
Browse files

UPSTREAM: 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: default avatarMatthew Wilcox <willy@infradead.org>
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Link: https://marc.info/?l=linux-mm&m=155384681109231&w=2


Signed-off-by: default avatarTri Vo <trong@android.com>
Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
(cherry picked from commit dadec066d8fa7da227f623f632ea114690fecaf8)
Bug: 132997968
Test: defconfig + CONFIG_GCOV_KERNEL records coverage

Change-Id: I69448d0721a5174d4f39fff0774a86361f37b8ef
parent 39e12695
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -683,6 +683,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)