From: Randy Dunlap <[email protected]> Fix build when CONFIG_MODULES is not enabled. Fixes multiple build errors.
Signed-off-by: Randy Dunlap <[email protected]> Reported-by: kbuild test robot <[email protected]> Cc: Andi Kleen <[email protected]> --- lib/bug.c | 2 ++ 1 file changed, 2 insertions(+) --- mmotm-2017-1019-1700.orig/lib/bug.c +++ mmotm-2017-1019-1700/lib/bug.c @@ -206,6 +206,7 @@ static void clear_once_table(struct bug_ void generic_bug_clear_once(void) { +#ifdef CONFIG_MODULES struct module *mod; rcu_read_lock_sched(); @@ -213,6 +214,7 @@ void generic_bug_clear_once(void) clear_once_table(mod->bug_table, mod->bug_table + mod->num_bugs); rcu_read_unlock_sched(); +#endif clear_once_table(__start___bug_table, __stop___bug_table); }

