linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] module: fix compile error that sect_empty() is not defined in init_build_id()
@ 2021-05-27 11:14 Yu Kuai
  2021-05-27 12:36 ` Jessica Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Kuai @ 2021-05-27 11:14 UTC (permalink / raw)
  To: jeyu; +Cc: linux-kernel, yukuai3, yi.zhang

If 'CONFIG_SYS' is not enabled while 'CONFIG_KALLSYMS' is enabled,
fix following compile error:

kernel/module.c:2805:8: error: implicit declaration of function ‘sect_empty’;
did you mean ‘desc_empty’? [-Werror=implicit-function-declaration]

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
 kernel/module.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/module.c b/kernel/module.c
index decf4601e943..173acb2aecc7 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2794,7 +2794,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
 }
 #endif /* CONFIG_KALLSYMS */
 
-#if IS_ENABLED(CONFIG_KALLSYMS) && IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID)
+#if IS_ENABLED(CONFIG_SYSFS) && IS_ENABLED(CONFIG_KALLSYMS) &&\
+	IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID)
 static void init_build_id(struct module *mod, const struct load_info *info)
 {
 	const Elf_Shdr *sechdr;
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] module: fix compile error that sect_empty() is not defined in init_build_id()
  2021-05-27 11:14 [PATCH] module: fix compile error that sect_empty() is not defined in init_build_id() Yu Kuai
@ 2021-05-27 12:36 ` Jessica Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Jessica Yu @ 2021-05-27 12:36 UTC (permalink / raw)
  To: Yu Kuai; +Cc: linux-kernel, yi.zhang

+++ Yu Kuai [27/05/21 19:14 +0800]:
>If 'CONFIG_SYS' is not enabled while 'CONFIG_KALLSYMS' is enabled,
>fix following compile error:
>
>kernel/module.c:2805:8: error: implicit declaration of function ‘sect_empty’;
>did you mean ‘desc_empty’? [-Werror=implicit-function-declaration]
>
>Signed-off-by: Yu Kuai <yukuai3@huawei.com>

Hi,

This has already been fixed in linux-next, see:

     https://lore.kernel.org/r/20210525105049.34804-1-cuibixuan@huawei.com

>---
> kernel/module.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/kernel/module.c b/kernel/module.c
>index decf4601e943..173acb2aecc7 100644
>--- a/kernel/module.c
>+++ b/kernel/module.c
>@@ -2794,7 +2794,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
> }
> #endif /* CONFIG_KALLSYMS */
>
>-#if IS_ENABLED(CONFIG_KALLSYMS) && IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID)
>+#if IS_ENABLED(CONFIG_SYSFS) && IS_ENABLED(CONFIG_KALLSYMS) &&\
>+	IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID)
> static void init_build_id(struct module *mod, const struct load_info *info)
> {
> 	const Elf_Shdr *sechdr;
>-- 
>2.25.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-27 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 11:14 [PATCH] module: fix compile error that sect_empty() is not defined in init_build_id() Yu Kuai
2021-05-27 12:36 ` Jessica Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).