tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
locking/jump_label
head: 3d1eb043696ac09420e73f9ef415ad7b5752be05
commit: a3f4ffd0446ee1ecf86a76420f341f428d6c9b3c [9/12] jump_label,x86: Emit short JMP
config: i386-randconfig-s001-20210318 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
#
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/jump_label
git checkout a3f4ffd0446ee1ecf86a76420f341f428d6c9b3c
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/kernel/jump_label.c: In function 'arch_jump_entry_size':
> arch/x86/kernel/jump_label.c:23:9: error: variable 'insn'
has initializer but incomplete type
23 | struct insn insn = {};
| ^~~~
arch/x86/kernel/jump_label.c:23:14: error: storage size of 'insn' isn't
known
23 | struct insn insn = {};
| ^~~~
> arch/x86/kernel/jump_label.c:25:2: error: implicit declaration of
function 'insn_decode_kernel' [-Werror=implicit-function-declaration]
25 | insn_decode_kernel(&insn, (void *)jump_entry_code(entry));
| ^~~~~~~~~~~~~~~~~~
arch/x86/kernel/jump_label.c:23:14: warning: unused variable 'insn'
[-Wunused-variable]
23 | struct insn insn = {};
| ^~~~
arch/x86/kernel/jump_label.c:29:1: error: control reaches end of non-void function
[-Werror=return-type]
29 | }
| ^
cc1: some warnings being treated as errors
vim +/insn +23 arch/x86/kernel/jump_label.c
20
21 int arch_jump_entry_size(struct jump_entry *entry)
22 {
23 struct insn insn = {};
24
25 insn_decode_kernel(&insn, (void *)jump_entry_code(entry));
26 BUG_ON(insn.length != 2 && insn.length != 5);
27
28 return insn.length;
29 }
30
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org