[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202503141434.n6oUhRIM-lkp@intel.com>
Date: Fri, 14 Mar 2025 15:10:26 +0800
From: kernel test robot <lkp@...el.com>
To: Antonio Hickey <contact@...oniohickey.com>,
Andreas Hindborg <a.hindborg@...nel.org>,
Boqun Feng <boqun.feng@...il.com>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Brendan Higgins <brendan.higgins@...ux.dev>,
David Gow <davidgow@...gle.com>, Rae Moar <rmoar@...gle.com>,
FUJITA Tomonori <fujita.tomonori@...il.com>,
Bjorn Helgaas <helgaas@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev,
Antonio Hickey <contact@...oniohickey.com>,
linux-block@...r.kernel.org, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com, netdev@...r.kernel.org,
linux-pci@...r.kernel.org
Subject: Re: [PATCH 3/3] rust: replace `addr_of[_mut]!` with `&raw [mut]`
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 linus/master v6.14-rc6 next-20250313]
[cannot apply to shuah-kselftest/kunit shuah-kselftest/kunit-fixes pci/next pci/for-linus 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/010001958dfec447-37d6d276-32f8-4b4e-b7bd-6d7ce2570ee2-000000%40email.amazonses.com
patch subject: [PATCH 3/3] rust: replace `addr_of[_mut]!` with `&raw [mut]`
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250314/202503141434.n6oUhRIM-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/202503141434.n6oUhRIM-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503141434.n6oUhRIM-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> warning: consider removing unnecessary double parentheses
--> rust/kernel/faux.rs:48:41
|
48 | unsafe { device::Device::as_ref((&raw mut (*self.as_raw()).dev)) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens
= note: `-W clippy::double-parens` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::double_parens)]`
--
>> warning: unnecessary parentheses around function argument
--> rust/kernel/faux.rs:48:41
|
48 | unsafe { device::Device::as_ref((&raw mut (*self.as_raw()).dev)) }
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
48 - unsafe { device::Device::as_ref((&raw mut (*self.as_raw()).dev)) }
48 + unsafe { device::Device::as_ref(&raw mut (*self.as_raw()).dev) }
|
--
>> warning: immediately dereferencing a reference
--> rust/kernel/task.rs:260:28
|
260 | let ptr = unsafe { *(&raw const (*self.as_ptr()).group_leader) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*self.as_ptr()).group_leader`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof
= note: `-W clippy::deref-addrof` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::deref_addrof)]`
--
>> warning: immediately dereferencing a reference
--> rust/kernel/task.rs:272:18
|
272 | unsafe { *(&raw const (*self.as_ptr()).pid) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*self.as_ptr()).pid`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists