The patch titled Subject: module: fix build error when CONFIG_SYSFS is disabled has been added to the -mm tree. Its filename is module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-fix-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-fix-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-fix-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Bixuan Cui <cuibixuan@xxxxxxxxxx> Subject: module: fix build error when CONFIG_SYSFS is disabled Fix build error when disable CONFIG_SYSFS: kernel/module.c:2805:8: error: implicit declaration of function `sect_empty'; did you mean `desc_empty'? [-Werror=implicit-function-declaration] 2805 | if (!sect_empty(sechdr) && sechdr->sh_type == SHT_NOTE && Link: https://lkml.kernel.org/r/20210525105049.34804-1-cuibixuan@xxxxxxxxxx Fixes: 9ee6682aa528 ("module: add printk formats to add module build ID to stacktraces") Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Signed-off-by: Bixuan Cui <cuibixuan@xxxxxxxxxx> Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/module.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) --- a/kernel/module.c~module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-fix-fix +++ a/kernel/module.c @@ -1462,6 +1462,13 @@ resolve_symbol_wait(struct module *mod, return ksym; } +#ifdef CONFIG_KALLSYMS +static inline bool sect_empty(const Elf_Shdr *sect) +{ + return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0; +} +#endif + /* * /sys/module/foo/sections stuff * J. Corbet <corbet@xxxxxxx> @@ -1469,11 +1476,6 @@ resolve_symbol_wait(struct module *mod, #ifdef CONFIG_SYSFS #ifdef CONFIG_KALLSYMS -static inline bool sect_empty(const Elf_Shdr *sect) -{ - return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0; -} - struct module_sect_attr { struct bin_attribute battr; unsigned long address; _ Patches currently in -mm which might be from cuibixuan@xxxxxxxxxx are module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-fix-fix.patch