linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 12681/12687] rust/helpers/spinlock.c:10:23: error: implicit declaration of function 'spinlock_check' is invalid in C99
Date: Wed, 25 Sep 2024 12:29:03 +0800	[thread overview]
Message-ID: <202409251238.vetlgXE9-lkp@intel.com> (raw)

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


                 reply	other threads:[~2024-09-25  4:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202409251238.vetlgXE9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ojeda@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox