arch/csky/kernel/module.c:43:1: warning: 'inline' is not at beginning of declaration

From: kernel test robot
Date: Sat Apr 10 2021 - 20:18:52 EST


Hi Julian,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 52e44129fba5cfc4e351fdb5e45849afc74d9a53
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
date: 26 hours ago
config: csky-randconfig-r013-20210411 (attached as .config)
compiler: csky-linux-gcc (GCC) 9.3.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/torvalds/linux.git/commit/?id=7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> arch/csky/kernel/module.c:43:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
43 | static void inline jsri_2_lrw_jsr(uint32_t *location)
| ^~~~~~

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT


vim +/inline +43 arch/csky/kernel/module.c

f553aa1c13cbc2 Guo Ren 2019-01-08 27
f553aa1c13cbc2 Guo Ren 2019-01-08 28 static void jsri_2_lrw_jsr(uint32_t *location)
f553aa1c13cbc2 Guo Ren 2019-01-08 29 {
70c25259537c07 Guo Ren 2019-01-10 30 uint16_t *location_tmp = (uint16_t *)location;
f553aa1c13cbc2 Guo Ren 2019-01-08 31
f553aa1c13cbc2 Guo Ren 2019-01-08 32 if (IS_BSR32(*location_tmp, *(location_tmp + 1)))
f553aa1c13cbc2 Guo Ren 2019-01-08 33 return;
f553aa1c13cbc2 Guo Ren 2019-01-08 34
f553aa1c13cbc2 Guo Ren 2019-01-08 35 if (IS_JSRI32(*location_tmp, *(location_tmp + 1))) {
f553aa1c13cbc2 Guo Ren 2019-01-08 36 /* jsri 0x... --> lrw r26, 0x... */
f553aa1c13cbc2 Guo Ren 2019-01-08 37 CHANGE_JSRI_TO_LRW(location);
f553aa1c13cbc2 Guo Ren 2019-01-08 38 /* lsli r0, r0 --> jsr r26 */
f553aa1c13cbc2 Guo Ren 2019-01-08 39 SET_JSR32_R26(location + 1);
f553aa1c13cbc2 Guo Ren 2019-01-08 40 }
f553aa1c13cbc2 Guo Ren 2019-01-08 41 }
f553aa1c13cbc2 Guo Ren 2019-01-08 42 #else
f553aa1c13cbc2 Guo Ren 2019-01-08 @43 static void inline jsri_2_lrw_jsr(uint32_t *location)
f553aa1c13cbc2 Guo Ren 2019-01-08 44 {
f553aa1c13cbc2 Guo Ren 2019-01-08 45 return;
f553aa1c13cbc2 Guo Ren 2019-01-08 46 }
9d056df0924edb Guo Ren 2018-09-05 47 #endif
9d056df0924edb Guo Ren 2018-09-05 48

:::::: The code at line 43 was first introduced by commit
:::::: f553aa1c13cbc29aaf420349a28fc33ca98440e5 csky: fixup relocation error with 807 & 860

:::::: TO: Guo Ren <ren_guo@xxxxxxxxx>
:::::: CC: Guo Ren <ren_guo@xxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip