mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Antonio Hickey" <contact@antoniohickey.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Antonio Hickey <contact@antoniohickey.com>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] rust: clippy: disable `addr_of!` and `addr_of_mut` macros
Date: Fri, 14 Mar 2025 13:54:17 +0800	[thread overview]
Message-ID: <202503141300.7VvqEzvm-lkp@intel.com> (raw)
In-Reply-To: <010001958dfeb4c7-0ed042d2-613b-4023-bb91-0c64f8a84fc9-000000@email.amazonses.com>

Hi Antonio,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rust/rust-next]
[also build test WARNING on driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus shuah-kselftest/kunit shuah-kselftest/kunit-fixes pci/next pci/for-linus linus/master v6.14-rc6 next-20250313]
[cannot apply to rust/rust-block-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Antonio-Hickey/rust-clippy-disable-addr_of-and-addr_of_mut-macros/20250313-133646
base:   https://github.com/Rust-for-Linux/linux rust-next
patch link:    https://lore.kernel.org/r/010001958dfeb4c7-0ed042d2-613b-4023-bb91-0c64f8a84fc9-000000%40email.amazonses.com
patch subject: [PATCH 2/3] rust: clippy: disable `addr_of!` and `addr_of_mut` macros
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250314/202503141300.7VvqEzvm-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250314/202503141300.7VvqEzvm-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/202503141300.7VvqEzvm-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/fs/file.rs:334:18
   |
   334 |         unsafe { core::ptr::addr_of!((*self.as_ptr()).f_flags).read_volatile() }
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/list.rs:179:34
   |
   179 |         unsafe { Opaque::raw_get(ptr::addr_of!((*me).inner)) }
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/sync/arc.rs:246:18
   |
   246 |         unsafe { core::ptr::addr_of!((*ptr).data) }
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/task.rs:260:29
   |
   260 |         let ptr = unsafe { *ptr::addr_of!((*self.as_ptr()).group_leader) };
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/task.rs:272:19
   |
   272 |         unsafe { *ptr::addr_of!((*self.as_ptr()).pid) }
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
--
>> warning: use of a disallowed macro `core::ptr::addr_of`
   --> rust/kernel/workqueue.rs:406:34
   |
   406 |         unsafe { Opaque::raw_get(core::ptr::addr_of!((*ptr).work)) }
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: use `&raw` instead `addr_of!` (from clippy.toml)
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros

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

  reply	other threads:[~2025-03-14  5:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250313053340.405979-1-contact@antoniohickey.com>
2025-03-13  5:33 ` [PATCH 1/3] rust: enable `raw_ref_op` feature Antonio Hickey
2025-03-13  8:51   ` Charalampos Mitrodimas
2025-03-13 11:39   ` Miguel Ojeda
2025-03-13 11:39   ` Benno Lossin
2025-03-13 11:40   ` Benno Lossin
2025-03-14  3:46   ` [PATCH v2 " Antonio Hickey
2025-03-14  3:46   ` [PATCH v2 2/3] rust: clippy: disable `addr_of!`, `addr_of_mut!` macros Antonio Hickey
2025-03-14 10:25     ` Benno Lossin
2025-03-14  3:47   ` [PATCH v2 3/3] rust: replace `addr_of[_mut]!` with `&raw [const | mut]` Antonio Hickey
2025-03-13  5:33 ` [PATCH 2/3] rust: clippy: disable `addr_of!` and `addr_of_mut` macros Antonio Hickey
2025-03-14  5:54   ` kernel test robot [this message]
2025-03-13  5:33 ` [PATCH 3/3] rust: replace `addr_of[_mut]!` with `&raw [mut]` Antonio Hickey
2025-03-14  7:10   ` kernel test robot
2025-03-13 12:16 [PATCH 2/3] rust: clippy: disable `addr_of!` and `addr_of_mut` macros Benno Lossin

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=202503141300.7VvqEzvm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=contact@antoniohickey.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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

all inboxes | Powered by JetHome®