All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Antonio Hickey" <contact@antoniohickey.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Brendan Higgins" <brendan.higgins@linux.dev>,
	"David Gow" <davidgow@google.com>, "Rae Moar" <rmoar@google.com>,
	"FUJITA Tomonori" <fujita.tomonori@gmail.com>,
	"Bjorn Helgaas" <helgaas@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Antonio Hickey <contact@antoniohickey.com>,
	linux-block@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kunit-dev@googlegroups.com, netdev@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 3/3] rust: replace `addr_of[_mut]!` with `&raw [mut]`
Date: Fri, 14 Mar 2025 15:10:26 +0800	[thread overview]
Message-ID: <202503141434.n6oUhRIM-lkp@intel.com> (raw)
In-Reply-To: <010001958dfec447-37d6d276-32f8-4b4e-b7bd-6d7ce2570ee2-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 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@intel.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

  reply	other threads:[~2025-03-14  7:10 UTC|newest]

Thread overview: 16+ 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:45   ` [PATCH v2 0/3] rust: use &raw [mut] place instead of addr_of[_mut]!(place) Antonio Hickey
2025-03-14 10:24     ` Benno Lossin
2025-03-14  3:46   ` [PATCH v2 1/3] rust: enable `raw_ref_op` feature 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
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 [this message]
2025-03-13 12:20 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=202503141434.n6oUhRIM-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=brendan.higgins@linux.dev \
    --cc=contact@antoniohickey.com \
    --cc=dakr@kernel.org \
    --cc=davidgow@google.com \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=helgaas@kernel.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rmoar@google.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.