kernel/gcov/gcc_4_7.c:162:9: error: implicit declaration of function 'within_module'; did you mean 'init_module'?
Subsystems (2)
kbuild test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 1baf02ec984b88b435e2fa065300179a3f48e7d2 commit: 8c3d220cb6b5f502745285106154bad632f43b15 [4291/4370] gcov: clang support config: x86_64-randconfig-a0-03291513 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout 8c3d220cb6b5f502745285106154bad632f43b15 # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
kernel/gcov/gcc_4_7.c: In function 'gcov_info_within_module':
>> kernel/gcov/gcc_4_7.c:162:9: error: implicit declaration of function 'within_module'; did you mean 'init_module'? [-Werror=implicit-function-declaration]
return within_module((unsigned long)info, mod);
^~~~~~~~~~~~~
init_modulecc1: some warnings being treated as errors
vim +162 kernel/gcov/gcc_4_7.c
152
153 /**
154 * gcov_info_within_module - check if a profiling data set belongs to a module
155 * @info: profiling data set
156 * @mod: module
157 *
158 * Returns true if profiling data belongs module, false otherwise.
159 */
160 bool gcov_info_within_module(struct gcov_info *info, struct module *mod)
161 {
> 162 return within_module((unsigned long)info, mod);
163 }
164
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
PATCH 1/1 gcov: include linux/module.h for within_module
Fixes commit 8c3d220cb6b5 ("gcov: clang support")
--- kernel/gcov/gcc_3_4.c | 1 + kernel/gcov/gcc_4_7.c | 1 + 2 files changed, 2 insertions(+)
kernel/gcov/gcc_3_4.c +1 -0
@@ -16,6 +16,7 @@*/ #include <linux/errno.h> +#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/seq_file.h>
kernel/gcov/gcc_4_7.c +1 -0
@@ -13,6 +13,7 @@*/ #include <linux/errno.h> +#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/seq_file.h>
Signature · 1 line
2.21.0.392.gf8f6787159e-goog
Re: [PATCH] gcov: include linux/module.h for within_module
Quoted 10 lines · Nick Desaulniers
Fixes commit
8c3d220cb6b5("gcov: clang support")Cc Greg Hackmann <[email protected]>Cc Tri Vo <[email protected]>Cc Peter Oberparleiter <[email protected]>Reported-by kbuild test robot <[email protected]>Signed-off-by Nick Desaulniers <[email protected]>
Did you test this? kernel/gcov/gcc_4_7.c includes local "gcov.h", which includes <linux/module.h>, so why didn't that work or why does this patch work?
thanks.
Quoted 30 lines
--- kernel/gcov/gcc_3_4.c | 1 + kernel/gcov/gcc_4_7.c | 1 + 2 files changed, 2 insertions(+)kernel/gcov/gcc_3_4.c +1
-0@@ -16,6 +16,7 @@*/ #include <linux/errno.h> +#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/seq_file.h> kernel/gcov/gcc_4_7.c +1
-0@@ -13,6 +13,7 @@*/ #include <linux/errno.h> +#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/seq_file.h>
Signature · 1 line
~Randy
Re: [PATCH] gcov: include linux/module.h for within_module
Quoted 12 lines · Randy Dunlap
Quoted 10 lines · Nick Desaulniers
Fixes commit
8c3d220cb6b5("gcov: clang support")Cc Greg Hackmann <[email protected]>Cc Tri Vo <[email protected]>Cc Peter Oberparleiter <[email protected]>Reported-by kbuild test robot <[email protected]>Signed-off-by Nick Desaulniers <[email protected]>
Quoted 6 lines
Reported-by Randy Dunlap <[email protected]>Did you test this?
kernel/gcov/gcc_4_7.cincludes local "gcov.h", which includes <linux/module.h>, so why didn't that work or why does this patch work?
No, this patch does not fix the build error for me.
Quoted 34 lines
thanks.
Quoted 30 lines
--- kernel/gcov/gcc_3_4.c | 1 + kernel/gcov/gcc_4_7.c | 1 + 2 files changed, 2 insertions(+)kernel/gcov/gcc_3_4.c +1
-0@@ -16,6 +16,7 @@*/ #include <linux/errno.h> +#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/seq_file.h> kernel/gcov/gcc_4_7.c +1
-0@@ -13,6 +13,7 @@*/ #include <linux/errno.h> +#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/seq_file.h>
Signature · 1 line
~Randy
Re: [PATCH] gcov: include linux/module.h for within_module
In reply to Randy DunlapQuoted 13 lines · Randy Dunlap
Quoted 10 lines · Nick Desaulniers
Fixes commit
8c3d220cb6b5("gcov: clang support")Cc Greg Hackmann <[email protected]>Cc Tri Vo <[email protected]>Cc Peter Oberparleiter <[email protected]>Reported-by kbuild test robot <[email protected]>Signed-off-by Nick Desaulniers <[email protected]>
Quoted 4 lines
Reported-by Randy Dunlap <[email protected]>Did you test this?
Yes, built with gcc 7.3 and
defconfig
+CONFIG_GCOV_KERNEL=yCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=yCONFIG_GCOV_FORMAT_4_7=y
Quoted 3 lines
kernel/gcov/gcc_4_7.cincludes local "gcov.h",
which includes <linux/module.h>, so why didn't that work or why does this patch work?
Good point. May be something in the configs from 0-day bot. Boarding a plane for Bangkok, but can dig further once landed.
Maybe module support was disabled?
--
Thanks,
~Nick Desaulniers
Re: [PATCH] gcov: include linux/module.h for within_module
Quoted 26 lines · Nick Desaulniers
Quoted 13 lines · Randy Dunlap
Quoted 10 lines · Nick Desaulniers
Fixes commit
8c3d220cb6b5("gcov: clang support")Cc Greg Hackmann <[email protected]>Cc Tri Vo <[email protected]>Cc Peter Oberparleiter <[email protected]>Reported-by kbuild test robot <[email protected]>Signed-off-by Nick Desaulniers <[email protected]>Quoted 4 lines
Reported-by Randy Dunlap <[email protected]>Did you test this?
Yes, built with gcc 7.3 and
defconfig
+CONFIG_GCOV_KERNEL=yCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=yCONFIG_GCOV_FORMAT_4_7=y
Quoted 8 lines
Quoted 3 lines
kernel/gcov/gcc_4_7.cincludes local "gcov.h",
which includes <linux/module.h>, so why didn't that work or why does this patch work?Good point. May be something in the configs from 0-day bot. Boarding a plane for Bangkok, but can dig further once landed.
Maybe module support was disabled?
Yes, I reported the problem with CONFIG_MODULES not enabled.
Signature · 1 line
~Randy
PATCH v2 1/1 gcov: fix when CONFIG_MODULES is not set
Fixes commit 8c3d220cb6b5 ("gcov: clang support")
--- kernel/gcov/gcc_3_4.c | 4 ++++ kernel/gcov/gcc_4_7.c | 4 ++++ 2 files changed, 8 insertions(+)
kernel/gcov/gcc_3_4.c +4 -0
@@ -146,7 +146,11 @@ void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info)*/ bool gcov_info_within_module (struct gcov_info *info,struct module *mod) { +#ifdef CONFIG_MODULES return within_module ((unsigned long )info, mod); +#else +return false; +#endif }/* Symbolic links to be created for each profiling data file. */
kernel/gcov/gcc_4_7.c +4 -0
@@ -159,7 +159,11 @@ void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info)*/ bool gcov_info_within_module (struct gcov_info *info,struct module *mod) { +#ifdef CONFIG_MODULES return within_module ((unsigned long )info, mod); +#else +return false; +#endif }/* Symbolic links to be created for each profiling data file. */
Signature · 1 line
2.21.0.392.gf8f6787159e-goog
Re: [PATCH v2] gcov: fix when CONFIG_MODULES is not set
Quoted 1 line · Nick Desaulniers
Fixes commit
8c3d220cb6b5("gcov: clang support")
There is a certain format for Fixes: and that's not quite it. :(
Quoted 9 lines
Cc Greg Hackmann <[email protected]>Cc Tri Vo <[email protected]>Cc Peter Oberparleiter <[email protected]>Reported-by Randy Dunlap <[email protected]>Reported-by kbuild test robot <[email protected]>Signed-off-by Nick Desaulniers <[email protected]>
Thanks.
Quoted 38 lines
--- kernel/gcov/gcc_3_4.c | 4 ++++ kernel/gcov/gcc_4_7.c | 4 ++++ 2 files changed, 8 insertions(+)kernel/gcov/gcc_3_4.c +4
-0@@ -146,7 +146,11 @@ void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info)*/ bool gcov_info_within_module (struct gcov_info *info,struct module *mod) { +#ifdef CONFIG_MODULES return within_module ((unsigned long )info, mod); +#else +return false; +#endif }/* Symbolic links to be created for each profiling data file. */ kernel/gcov/gcc_4_7.c +4
-0@@ -159,7 +159,11 @@ void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info)*/ bool gcov_info_within_module (struct gcov_info *info,struct module *mod) { +#ifdef CONFIG_MODULES return within_module ((unsigned long )info, mod); +#else +return false; +#endif }/* Symbolic links to be created for each profiling data file. */
Signature · 1 line
~Randy
Re: [PATCH v2] gcov: fix when CONFIG_MODULES is not set
Quoted 16 lines · Randy Dunlap
Quoted 1 line · Nick Desaulniers
Fixes commit
8c3d220cb6b5("gcov: clang support")There is a certain format for Fixes: and that's not quite it. :(
Quoted 9 lines
Cc Greg Hackmann <[email protected]>Cc Tri Vo <[email protected]>Cc Peter Oberparleiter <[email protected]>Reported-by Randy Dunlap <[email protected]>Reported-by kbuild test robot <[email protected]>Signed-off-by Nick Desaulniers <[email protected]>
Quoted 8 lines
Thanks.
Quoted 4 lines
--- kernel/gcov/gcc_3_4.c | 4 ++++ kernel/gcov/gcc_4_7.c | 4 ++++ 2 files changed, 8 insertions(+)
Thanks for taking a look at this Nick! I believe same fix should be applied to kernel/gcov/clang.c. I'll send out an updated version later today.
Re: [PATCH v2] gcov: fix when CONFIG_MODULES is not set
Quoted 7 lines · Tri Vo
Quoted 5 lines · Randy Dunlap
Quoted 1 line · Nick Desaulniers
Fixes commit
8c3d220cb6b5("gcov: clang support")There is a certain format for Fixes: and that's not quite it. :(
Looks like the format is:
Fixes: <first 12 characters of commit sha> ("<first line of commit>") so:
We should update:
https://www.kernel.org/doc/html/v5.0/process/stable-kernel-rules.html
to include this information.
Quoted 3 lines
Thanks for taking a look at this Nick! I believe same fix should be applied to
kernel/gcov/clang.c. I'll send out an updated version later today.
All yours, happy to review.
Signature · 2 lines
Thanks, ~Nick Desaulniers
Re: [PATCH v2] gcov: fix when CONFIG_MODULES is not set
Quoted 8 lines · Nick Desaulniers
Looks like the format is:
Fixes: <first 12 characters of commit sha> ("<first line of commit>") so:Fixes 8c3d220cb6b5 ("gcov: clang support")We should update:
https://www.kernel.org/doc/html/v5.0/process/stable-kernel-rules.html
to include this information.
It's in Documentation/process/submitting-patches.rst already.