linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 12681/12687] rust/helpers/spinlock.c:10:23: error: implicit declaration of function 'spinlock_check' is invalid in C99
@ 2024-09-25  4:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-25  4:29 UTC (permalink / raw)
  To: Miguel Ojeda; +Cc: oe-kbuild-all, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   4d0326b60bb753627437fff0f76bf1525bcda422
commit: 000e589e413dd734f191ba4e73340559e65f104d [12681/12687] Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git
config: arm64-randconfig-r122-20240924 (https://download.01.org/0day-ci/archive/20240925/202409251238.vetlgXE9-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce: (https://download.01.org/0day-ci/archive/20240925/202409251238.vetlgXE9-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409251238.vetlgXE9-lkp@intel.com/

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

   In file included from rust/helpers/helpers.c:22:
>> rust/helpers/spinlock.c:10:23: error: implicit declaration of function 'spinlock_check' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           __raw_spin_lock_init(spinlock_check(lock), name, key, LD_WAIT_CONFIG);
                                ^
>> rust/helpers/spinlock.c:10:23: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'raw_spinlock_t *' (aka 'struct raw_spinlock *') [-Wint-conversion]
           __raw_spin_lock_init(spinlock_check(lock), name, key, LD_WAIT_CONFIG);
                                ^~~~~~~~~~~~~~~~~~~~
   include/linux/spinlock.h:101:52: note: passing argument to parameter 'lock' here
     extern void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name,
                                                      ^
   1 warning and 1 error generated.
   make[3]: *** [scripts/Makefile.build:229: rust/helpers/helpers.o] Error 1
>> rust/helpers/spinlock.c:10:23: error: implicit declaration of function 'spinlock_check' is invalid in C99 [-Wimplicit-function-declaration]
>> rust/helpers/spinlock.c:10:23: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'raw_spinlock_t *' (aka 'struct raw_spinlock *') [-Wint-conversion]
   include/linux/spinlock.h:101:52: note: passing argument to parameter 'lock' here
>> clang diag: rust/helpers/spinlock.c:10:23: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'raw_spinlock_t *' (aka 'struct raw_spinlock *') [-Wint-conversion]
   make[3]: *** [rust/Makefile:304: rust/bindings/bindings_helpers_generated.rs] Error 101
   make[3]: *** Deleting file 'rust/bindings/bindings_helpers_generated.rs'
   make[3]: Target 'rust/' not remade because of errors.
   make[2]: *** [Makefile:1209: prepare] Error 2
   make[1]: *** [Makefile:224: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:224: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for OMAP2PLUS_MBOX
   Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS || ARCH_K3 [=n])
   Selected by [m]:
   - TI_K3_M4_REMOTEPROC [=m] && REMOTEPROC [=y] && (ARCH_K3 [=n] || COMPILE_TEST [=y])


vim +/spinlock_check +10 rust/helpers/spinlock.c

876346536c1b59 Andreas Hindborg 2024-08-15   5  
876346536c1b59 Andreas Hindborg 2024-08-15   6  void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
876346536c1b59 Andreas Hindborg 2024-08-15   7  				  struct lock_class_key *key)
876346536c1b59 Andreas Hindborg 2024-08-15   8  {
876346536c1b59 Andreas Hindborg 2024-08-15   9  #ifdef CONFIG_DEBUG_SPINLOCK
876346536c1b59 Andreas Hindborg 2024-08-15 @10  	__raw_spin_lock_init(spinlock_check(lock), name, key, LD_WAIT_CONFIG);
876346536c1b59 Andreas Hindborg 2024-08-15  11  #else
876346536c1b59 Andreas Hindborg 2024-08-15  12  	spin_lock_init(lock);
876346536c1b59 Andreas Hindborg 2024-08-15  13  #endif
876346536c1b59 Andreas Hindborg 2024-08-15  14  }
876346536c1b59 Andreas Hindborg 2024-08-15  15  

:::::: The code at line 10 was first introduced by commit
:::::: 876346536c1b59a5b1b5e44477b1b3ece77647fd rust: kbuild: split up helpers.c

:::::: TO: Andreas Hindborg <a.hindborg@samsung.com>
:::::: CC: Miguel Ojeda <ojeda@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-25  4:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-25  4:29 [linux-next:master 12681/12687] rust/helpers/spinlock.c:10:23: error: implicit declaration of function 'spinlock_check' is invalid in C99 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox