From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [mingo-tip:sched/headers 1105/2380] arch/powerpc/include/asm/inst.h:143:17: error: implicit declaration of function 'sprintf'
Date: Mon, 10 Jan 2022 06:43:14 +0800 [thread overview]
Message-ID: <202201100628.S5iEUAdr-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 9825 bytes --]
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 351bfbf7f1e8dce84b605c8007c98dd603c4ca4d
commit: cda4a13524f2ac766110f33d7851a490d39accd4 [1105/2380] headers/deps: Add header dependencies to .c files: <linux/kernel.h>
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220110/202201100628.S5iEUAdr-lkp(a)intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=cda4a13524f2ac766110f33d7851a490d39accd4
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout cda4a13524f2ac766110f33d7851a490d39accd4
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Note: the mingo-tip/sched/headers HEAD 351bfbf7f1e8dce84b605c8007c98dd603c4ca4d builds fine.
It only hurts bisectability.
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/hw_breakpoint.h:12,
from arch/powerpc/include/asm/processor.h:43,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:61,
from arch/powerpc/include/asm/ptrace.h:323,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/atomic_api.h:1,
from include/linux/jump_label.h:76,
from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:559,
from include/linux/kernel.h:20,
from kernel/bounds.c:10:
arch/powerpc/include/asm/cpu_has_feature.h:21:31: error: array type has incomplete element type 'struct static_key_true'
21 | extern struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS];
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/cpu_has_feature.h: In function 'cpu_has_feature':
arch/powerpc/include/asm/cpu_has_feature.h:32:14: error: 'static_key_initialized' undeclared (first use in this function)
32 | if (!static_key_initialized) {
| ^~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/cpu_has_feature.h:32:14: note: each undeclared identifier is reported only once for each function it appears in
arch/powerpc/include/asm/cpu_has_feature.h:46:16: error: implicit declaration of function 'static_branch_likely' [-Werror=implicit-function-declaration]
46 | return static_branch_likely(&cpu_feature_keys[i]);
| ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/cpu_has_feature.h:25:13: warning: variable 'i' set but not used [-Wunused-but-set-variable]
25 | int i;
| ^
In file included from arch/powerpc/include/asm/hw_breakpoint.h:13,
from arch/powerpc/include/asm/processor.h:43,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:61,
from arch/powerpc/include/asm/ptrace.h:323,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/atomic_api.h:1,
from include/linux/jump_label.h:76,
from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:559,
from include/linux/kernel.h:20,
from kernel/bounds.c:10:
arch/powerpc/include/asm/inst.h: In function '__ppc_inst_as_str':
>> arch/powerpc/include/asm/inst.h:143:17: error: implicit declaration of function 'sprintf' [-Werror=implicit-function-declaration]
143 | sprintf(str, "%08x %08x", ppc_inst_val(x), ppc_inst_suffix(x));
| ^~~~~~~
arch/powerpc/include/asm/inst.h:1:1: note: include '<stdio.h>' or provide a declaration of 'sprintf'
+++ |+#include <stdio.h>
1 | /* SPDX-License-Identifier: GPL-2.0-or-later */
>> arch/powerpc/include/asm/inst.h:143:17: warning: incompatible implicit declaration of built-in function 'sprintf' [-Wbuiltin-declaration-mismatch]
143 | sprintf(str, "%08x %08x", ppc_inst_val(x), ppc_inst_suffix(x));
| ^~~~~~~
arch/powerpc/include/asm/inst.h:143:17: note: include '<stdio.h>' or provide a declaration of 'sprintf'
In file included from arch/powerpc/include/asm/ptrace.h:323,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/atomic_api.h:1,
from include/linux/jump_label.h:76,
from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:559,
from include/linux/kernel.h:20,
from kernel/bounds.c:10:
arch/powerpc/include/asm/thread_info.h: In function 'clear_thread_local_flags':
include/linux/thread_info.h:26:32: error: implicit declaration of function 'task_thread_info'; did you mean 'current_thread_info'? [-Werror=implicit-function-declaration]
26 | # define current_thread_info() task_thread_info(current)
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:159:34: note: in expansion of macro 'current_thread_info'
159 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
include/linux/thread_info.h:26:32: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
26 | # define current_thread_info() task_thread_info(current)
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:159:34: note: in expansion of macro 'current_thread_info'
159 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h: In function 'test_thread_local_flags':
include/linux/thread_info.h:26:32: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
26 | # define current_thread_info() task_thread_info(current)
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:165:34: note: in expansion of macro 'current_thread_info'
165 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:121: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1197: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/sprintf +143 arch/powerpc/include/asm/inst.h
50428fdc53ba48 Jordan Niethe 2020-06-02 139
50428fdc53ba48 Jordan Niethe 2020-06-02 140 static inline char *__ppc_inst_as_str(char str[PPC_INST_STR_LEN], struct ppc_inst x)
50428fdc53ba48 Jordan Niethe 2020-06-02 141 {
50428fdc53ba48 Jordan Niethe 2020-06-02 142 if (ppc_inst_prefixed(x))
50428fdc53ba48 Jordan Niethe 2020-06-02 @143 sprintf(str, "%08x %08x", ppc_inst_val(x), ppc_inst_suffix(x));
50428fdc53ba48 Jordan Niethe 2020-06-02 144 else
50428fdc53ba48 Jordan Niethe 2020-06-02 145 sprintf(str, "%08x", ppc_inst_val(x));
50428fdc53ba48 Jordan Niethe 2020-06-02 146
50428fdc53ba48 Jordan Niethe 2020-06-02 147 return str;
50428fdc53ba48 Jordan Niethe 2020-06-02 148 }
50428fdc53ba48 Jordan Niethe 2020-06-02 149
:::::: The code at line 143 was first introduced by commit
:::::: 50428fdc53ba48f6936b10dfdc0d644972403908 powerpc: Add a ppc_inst_as_str() helper
:::::: TO: Jordan Niethe <jniethe5@gmail.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [mingo-tip:sched/headers 1105/2380] arch/powerpc/include/asm/inst.h:143:17: error: implicit declaration of function 'sprintf'
Date: Mon, 10 Jan 2022 06:43:14 +0800 [thread overview]
Message-ID: <202201100628.S5iEUAdr-lkp@intel.com> (raw)
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 351bfbf7f1e8dce84b605c8007c98dd603c4ca4d
commit: cda4a13524f2ac766110f33d7851a490d39accd4 [1105/2380] headers/deps: Add header dependencies to .c files: <linux/kernel.h>
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220110/202201100628.S5iEUAdr-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=cda4a13524f2ac766110f33d7851a490d39accd4
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout cda4a13524f2ac766110f33d7851a490d39accd4
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Note: the mingo-tip/sched/headers HEAD 351bfbf7f1e8dce84b605c8007c98dd603c4ca4d builds fine.
It only hurts bisectability.
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/hw_breakpoint.h:12,
from arch/powerpc/include/asm/processor.h:43,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:61,
from arch/powerpc/include/asm/ptrace.h:323,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/atomic_api.h:1,
from include/linux/jump_label.h:76,
from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:559,
from include/linux/kernel.h:20,
from kernel/bounds.c:10:
arch/powerpc/include/asm/cpu_has_feature.h:21:31: error: array type has incomplete element type 'struct static_key_true'
21 | extern struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS];
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/cpu_has_feature.h: In function 'cpu_has_feature':
arch/powerpc/include/asm/cpu_has_feature.h:32:14: error: 'static_key_initialized' undeclared (first use in this function)
32 | if (!static_key_initialized) {
| ^~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/cpu_has_feature.h:32:14: note: each undeclared identifier is reported only once for each function it appears in
arch/powerpc/include/asm/cpu_has_feature.h:46:16: error: implicit declaration of function 'static_branch_likely' [-Werror=implicit-function-declaration]
46 | return static_branch_likely(&cpu_feature_keys[i]);
| ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/cpu_has_feature.h:25:13: warning: variable 'i' set but not used [-Wunused-but-set-variable]
25 | int i;
| ^
In file included from arch/powerpc/include/asm/hw_breakpoint.h:13,
from arch/powerpc/include/asm/processor.h:43,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:61,
from arch/powerpc/include/asm/ptrace.h:323,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/atomic_api.h:1,
from include/linux/jump_label.h:76,
from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:559,
from include/linux/kernel.h:20,
from kernel/bounds.c:10:
arch/powerpc/include/asm/inst.h: In function '__ppc_inst_as_str':
>> arch/powerpc/include/asm/inst.h:143:17: error: implicit declaration of function 'sprintf' [-Werror=implicit-function-declaration]
143 | sprintf(str, "%08x %08x", ppc_inst_val(x), ppc_inst_suffix(x));
| ^~~~~~~
arch/powerpc/include/asm/inst.h:1:1: note: include '<stdio.h>' or provide a declaration of 'sprintf'
+++ |+#include <stdio.h>
1 | /* SPDX-License-Identifier: GPL-2.0-or-later */
>> arch/powerpc/include/asm/inst.h:143:17: warning: incompatible implicit declaration of built-in function 'sprintf' [-Wbuiltin-declaration-mismatch]
143 | sprintf(str, "%08x %08x", ppc_inst_val(x), ppc_inst_suffix(x));
| ^~~~~~~
arch/powerpc/include/asm/inst.h:143:17: note: include '<stdio.h>' or provide a declaration of 'sprintf'
In file included from arch/powerpc/include/asm/ptrace.h:323,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/atomic_api.h:1,
from include/linux/jump_label.h:76,
from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:559,
from include/linux/kernel.h:20,
from kernel/bounds.c:10:
arch/powerpc/include/asm/thread_info.h: In function 'clear_thread_local_flags':
include/linux/thread_info.h:26:32: error: implicit declaration of function 'task_thread_info'; did you mean 'current_thread_info'? [-Werror=implicit-function-declaration]
26 | # define current_thread_info() task_thread_info(current)
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:159:34: note: in expansion of macro 'current_thread_info'
159 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
include/linux/thread_info.h:26:32: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
26 | # define current_thread_info() task_thread_info(current)
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:159:34: note: in expansion of macro 'current_thread_info'
159 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h: In function 'test_thread_local_flags':
include/linux/thread_info.h:26:32: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
26 | # define current_thread_info() task_thread_info(current)
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:165:34: note: in expansion of macro 'current_thread_info'
165 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:121: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1197: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/sprintf +143 arch/powerpc/include/asm/inst.h
50428fdc53ba48 Jordan Niethe 2020-06-02 139
50428fdc53ba48 Jordan Niethe 2020-06-02 140 static inline char *__ppc_inst_as_str(char str[PPC_INST_STR_LEN], struct ppc_inst x)
50428fdc53ba48 Jordan Niethe 2020-06-02 141 {
50428fdc53ba48 Jordan Niethe 2020-06-02 142 if (ppc_inst_prefixed(x))
50428fdc53ba48 Jordan Niethe 2020-06-02 @143 sprintf(str, "%08x %08x", ppc_inst_val(x), ppc_inst_suffix(x));
50428fdc53ba48 Jordan Niethe 2020-06-02 144 else
50428fdc53ba48 Jordan Niethe 2020-06-02 145 sprintf(str, "%08x", ppc_inst_val(x));
50428fdc53ba48 Jordan Niethe 2020-06-02 146
50428fdc53ba48 Jordan Niethe 2020-06-02 147 return str;
50428fdc53ba48 Jordan Niethe 2020-06-02 148 }
50428fdc53ba48 Jordan Niethe 2020-06-02 149
:::::: The code at line 143 was first introduced by commit
:::::: 50428fdc53ba48f6936b10dfdc0d644972403908 powerpc: Add a ppc_inst_as_str() helper
:::::: TO: Jordan Niethe <jniethe5@gmail.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2022-01-09 22:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-09 22:43 kernel test robot [this message]
2022-01-09 22:43 ` [mingo-tip:sched/headers 1105/2380] arch/powerpc/include/asm/inst.h:143:17: error: implicit declaration of function 'sprintf' kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202201100628.S5iEUAdr-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.