Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lyude Paul <lyude@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Boqun Feng <boqun@kernel.org>, Benno Lossin <lossin@kernel.org>,
	Andreas Hindborg <a.hindborg@kernel.org>,
	Gary Guo <gary@garyguo.net>
Subject: [boqun:rust-rcu 14/27] rust/helpers/interrupt.c:17:9: warning: static function 'arch_local_save_flags' is used in an inline function with external linkage
Date: Mon, 13 Jul 2026 12:45:07 +0800	[thread overview]
Message-ID: <202607131219.euJHPSJ5-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git rust-rcu
head:   dcecd5f6e71e2437c8abe333ee2426fbe63e6398
commit: 27e30521043c39ca18ea3e28f825f9c7bd30b580 [14/27] rust: Introduce interrupt module
config: s390-randconfig-002-20260713 (https://download.01.org/0day-ci/archive/20260713/202607131219.euJHPSJ5-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260713/202607131219.euJHPSJ5-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/202607131219.euJHPSJ5-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from rust/helpers/helpers.c:68:
>> rust/helpers/interrupt.c:17:9: warning: static function 'arch_local_save_flags' is used in an inline function with external linkage [-Wstatic-in-inline]
      17 |         return irqs_disabled();
         |                ^
   include/linux/irqflags.h:256:3: note: expanded from macro 'irqs_disabled'
     256 |                 raw_local_save_flags(_flags);           \
         |                 ^
   include/linux/irqflags.h:184:11: note: expanded from macro 'raw_local_save_flags'
     184 |                 flags = arch_local_save_flags();        \
         |                         ^
   rust/helpers/interrupt.c:15:1: note: use 'static' to give inline function 'rust_helper_irqs_disabled' internal linkage
      15 | __rust_helper bool rust_helper_irqs_disabled(void)
         | ^
         | static 
   rust/helpers/helpers.c:38:23: note: expanded from macro '__rust_helper'
      38 | #define __rust_helper __always_inline
         |                       ^
   include/linux/compiler_attributes.h:55:41: note: expanded from macro '__always_inline'
      55 | #define __always_inline                 inline __attribute__((__always_inline__))
         |                                         ^
   include/linux/compiler_types.h:235:16: note: expanded from macro 'inline'
     235 | #define inline inline __gnu_inline __inline_maybe_unused notrace
         |                ^
   arch/s390/include/asm/irqflags.h:46:48: note: 'arch_local_save_flags' declared here
      46 | static arch_local_irq_attributes unsigned long arch_local_save_flags(void)
         |                                                ^
   1 warning generated.
--
   In file included from rust/helpers/helpers.c:68:
>> rust/helpers/interrupt.c:17:9: warning: static function 'arch_local_save_flags' is used in an inline function with external linkage [-Wstatic-in-inline]
   17 |         return irqs_disabled();
   |                ^
   include/linux/irqflags.h:256:3: note: expanded from macro 'irqs_disabled'
   256 |                 raw_local_save_flags(_flags);           \
   |                 ^
   include/linux/irqflags.h:184:11: note: expanded from macro 'raw_local_save_flags'
   184 |                 flags = arch_local_save_flags();        \
   |                         ^
   rust/helpers/interrupt.c:15:1: note: use 'static' to give inline function 'rust_helper_irqs_disabled' internal linkage
   15 | __rust_helper bool rust_helper_irqs_disabled(void)
   | ^
   | static
   rust/helpers/helpers.c:38:23: note: expanded from macro '__rust_helper'
   38 | #define __rust_helper __always_inline
   |                       ^
   include/linux/compiler_attributes.h:55:41: note: expanded from macro '__always_inline'
   55 | #define __always_inline                 inline __attribute__((__always_inline__))
   |                                         ^
   include/linux/compiler_types.h:235:16: note: expanded from macro 'inline'
   235 | #define inline inline __gnu_inline __inline_maybe_unused notrace
   |                ^
   arch/s390/include/asm/irqflags.h:46:48: note: 'arch_local_save_flags' declared here
   46 | static arch_local_irq_attributes unsigned long arch_local_save_flags(void)
   |                                                ^
   1 warning generated.
   warning: 1 warning emitted


vim +/arch_local_save_flags +17 rust/helpers/interrupt.c

    14	
    15	__rust_helper bool rust_helper_irqs_disabled(void)
    16	{
  > 17		return irqs_disabled();

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

                 reply	other threads:[~2026-07-13  4:45 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=202607131219.euJHPSJ5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a.hindborg@kernel.org \
    --cc=boqun@kernel.org \
    --cc=gary@garyguo.net \
    --cc=llvm@lists.linux.dev \
    --cc=lossin@kernel.org \
    --cc=lyude@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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