Skip to contentSkip to conversation

security/keys/trusted-keys/trusted_tee.c:288:21: error: a parameter list without types is only allowed in a function definition

PATCH kernel test robot 3 participants 3 messages Mar 16, 2021 – Mar 17, 2021

Subsystems (4)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
head:   8a3fa8ade8a35d8f7c178f5680f07f223da41b87
commit: 2199c5e531b9630fc0f58da0d58bbd2a50f27787 [10/12] KEYS: trusted: Introduce TEE based Trusted Keys
config: mips-randconfig-r016-20210316 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725)

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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?id=2199c5e531b9630fc0f58da0d58bbd2a50f27787
git remote add jarkko-linux-tpmdd git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
git fetch --no-tags jarkko-linux-tpmdd master
git checkout 2199c5e531b9630fc0f58da0d58bbd2a50f27787
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate

All error/warnings (new ones prefixed by >>):

>> security/keys/trusted-keys/trusted_tee.c:288:1: warning: declaration specifier missing, defaulting to 'int'
   MODULE_DEVICE_TABLE(tee, trusted_key_id_table);
   ^
   int
>> security/keys/trusted-keys/trusted_tee.c:288:21: error: a parameter list without types is only allowed in a function definition
   MODULE_DEVICE_TABLE(tee, trusted_key_id_table);
                       ^

1 warning and 1 error generated.

vim +288 security/keys/trusted-keys/trusted_tee.c

282
283 static const struct tee_client_device_id trusted_key_id_table[] = {
284 {UUID_INIT(0xf04a0fe7, 0x1f5d, 0x4b9b,
285 0xab, 0xf7, 0x61, 0x9b, 0x85, 0xb4, 0xce, 0x8c)},
286 {}
287 };

 > 288	MODULE_DEVICE_TABLE(tee, trusted_key_id_table);

289

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#1 lore raw

Hi Jarkko,

Please incorporate the following change to get rid of the reported warning.

(quoted diff) +0 -0

b/security/keys/trusted-keys/trusted_tee.c
index 62983d98a252..2ce66c199e1d 100644

security/keys/trusted-keys/trusted_tee.c +1 -0
@@ -8,6 +8,7 @@
 
 #include <linux/err.h>
 #include <linux/key-type.h>
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/tee_drv.h>

-Sumit

Quoted 47 lines · kernel test robot
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
head:   8a3fa8ade8a35d8f7c178f5680f07f223da41b87
commit: 2199c5e531b9630fc0f58da0d58bbd2a50f27787 [10/12] KEYS: trusted: Introduce TEE based Trusted Keys
config: mips-randconfig-r016-20210316 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725)

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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?id=2199c5e531b9630fc0f58da0d58bbd2a50f27787
git remote add jarkko-linux-tpmdd git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
git fetch --no-tags jarkko-linux-tpmdd master
git checkout 2199c5e531b9630fc0f58da0d58bbd2a50f27787
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate

All error/warnings (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

security/keys/trusted-keys/trusted_tee.c:288:1: warning: declaration specifier missing, defaulting to 'int'

   MODULE_DEVICE_TABLE(tee, trusted_key_id_table);
   ^
   int
Quoted 1 line
Quoted 1 line

security/keys/trusted-keys/trusted_tee.c:288:21: error: a parameter list without types is only allowed in a function definition

   MODULE_DEVICE_TABLE(tee, trusted_key_id_table);
                       ^

1 warning and 1 error generated.

vim +288 security/keys/trusted-keys/trusted_tee.c

   282
   283  static const struct tee_client_device_id trusted_key_id_table[] = {
   284          {UUID_INIT(0xf04a0fe7, 0x1f5d, 0x4b9b,
   285                     0xab, 0xf7, 0x61, 0x9b, 0x85, 0xb4, 0xce, 0x8c)},
   286          {}
   287  };
Quoted 1 line

288 MODULE_DEVICE_TABLE(tee, trusted_key_id_table);

289

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

maintainer
#2 lore raw
Quoted 3 lines · Sumit Garg

Hi Jarkko,

Please incorporate the following change to get rid of the reported warning.

Thanks, done.

/Jarkko