public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gary Guo <gary@garyguo.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Miguel Ojeda <ojeda@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Andreas Hindborg <a.hindborg@kernel.org>
Subject: [rust:rust-next 17/29] rust/helpers/dma.c:17:2: warning: static function 'dma_free_attrs' is used in an inline function with external linkage
Date: Tue, 07 Apr 2026 11:54:17 +0800	[thread overview]
Message-ID: <202604041420.tOm3h6GQ-lkp@intel.com> (raw)

tree:   https://github.com/Rust-for-Linux/linux rust-next
head:   36f5a2b09e650b82d7b2a106e3b93af48c2010d9
commit: db702816ad4d1d0ae54a5443c8865448f2dde75f [17/29] rust: helpers: #define __rust_helper
config: um-randconfig-001-20260404 (https://download.01.org/0day-ci/archive/20260404/202604041420.tOm3h6GQ-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260404/202604041420.tOm3h6GQ-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/202604041420.tOm3h6GQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from rust/helpers/helpers.c:59:
>> rust/helpers/dma.c:17:2: warning: static function 'dma_free_attrs' is used in an inline function with external linkage [-Wstatic-in-inline]
      17 |         dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs);
         |         ^
   rust/helpers/dma.c:12:1: note: use 'static' to give inline function 'rust_helper_dma_free_attrs' internal linkage
      12 | __rust_helper void rust_helper_dma_free_attrs(struct device *dev, size_t size,
         | ^
         | 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
         |                ^
   include/linux/dma-mapping.h:251:13: note: 'dma_free_attrs' declared here
     251 | static void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
         |             ^
   1 warning generated.
--
   In file included from rust/helpers/helpers.c:59:
>> rust/helpers/dma.c:17:2: warning: static function 'dma_free_attrs' is used in an inline function with external linkage [-Wstatic-in-inline]
      17 |         dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs);
         |         ^
   rust/helpers/dma.c:12:1: note: use 'static' to give inline function 'rust_helper_dma_free_attrs' internal linkage
      12 | __rust_helper void rust_helper_dma_free_attrs(struct device *dev, size_t size,
         | ^
         | 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
         |                ^
   include/linux/dma-mapping.h:251:13: note: 'dma_free_attrs' declared here
     251 | static void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
         |             ^
   1 warning generated.


vim +/dma_free_attrs +17 rust/helpers/dma.c

c1b4071ec3a6a5 FUJITA Tomonori  2025-04-12  11  
8a03afe9476310 Alice Ryhl       2025-12-02  12  __rust_helper void rust_helper_dma_free_attrs(struct device *dev, size_t size,
8a03afe9476310 Alice Ryhl       2025-12-02  13  					      void *cpu_addr,
8a03afe9476310 Alice Ryhl       2025-12-02  14  					      dma_addr_t dma_handle,
8a03afe9476310 Alice Ryhl       2025-12-02  15  					      unsigned long attrs)
c1b4071ec3a6a5 FUJITA Tomonori  2025-04-12  16  {
c1b4071ec3a6a5 FUJITA Tomonori  2025-04-12 @17  	dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs);
c1b4071ec3a6a5 FUJITA Tomonori  2025-04-12  18  }
101d66828a4eef Danilo Krummrich 2025-07-16  19  

:::::: The code at line 17 was first introduced by commit
:::::: c1b4071ec3a6a594df6c49bf8f04a60a88072525 rust: helpers: Add dma_alloc_attrs() and dma_free_attrs()

:::::: TO: FUJITA Tomonori <fujita.tomonori@gmail.com>
:::::: CC: Miguel Ojeda <ojeda@kernel.org>

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

                 reply	other threads:[~2026-04-07  3:54 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=202604041420.tOm3h6GQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=gary@garyguo.net \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.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