All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Joel Fernandes <joelagnelf@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [jfern:nova/mm 5/30] warning: associated items `from_raw`, `next`, and `new` are never used
Date: Sun, 25 Jan 2026 09:07:50 +0800	[thread overview]
Message-ID: <202601250810.q4eMSFkF-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git nova/mm
head:   b94c5d9b67e466e13a0e7ab9ac11c4bbc1cac1a9
commit: 39d0c149fcf8f63632522435df53e3648999d824 [5/30] rust: clist: Add support to interface with C linked lists
config: x86_64-buildonly-randconfig-004-20260125 (https://download.01.org/0day-ci/archive/20260125/202601250810.q4eMSFkF-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/20260125/202601250810.q4eMSFkF-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/202601250810.q4eMSFkF-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> warning: associated items `from_raw`, `next`, and `new` are never used
   --> rust/kernel/clist.rs:113:26
   |
   105 | impl CListHead {
   | -------------- associated items in this implementation
   ...
   113 |     pub(crate) unsafe fn from_raw<'a>(ptr: *mut bindings::list_head) -> &'a Self {
   |                          ^^^^^^^^
   ...
   128 |     pub(crate) fn next(&self) -> &Self {
   |                   ^^^^
   ...
   145 |     pub(crate) fn new() -> impl PinInit<Self> {
   |                   ^^^
   |
   = note: `#[warn(dead_code)]` on by default
--
>> warning: struct `CListHeadIter` is never constructed
   --> rust/kernel/clist.rs:179:8
   |
   179 | struct CListHeadIter<'a> {
   |        ^^^^^^^^^^^^^
--
>> warning: associated items `from_raw` and `iter` are never used
   --> rust/kernel/clist.rs:231:26
   |
   220 | impl<T, const OFFSET: usize> CList<T, OFFSET> {
   | --------------------------------------------- associated items in this implementation
   ...
   231 |     pub(crate) unsafe fn from_raw<'a>(ptr: *mut bindings::list_head) -> &'a Self {
   |                          ^^^^^^^^
   ...
   247 |     pub(crate) fn iter(&self) -> CListIter<'_, T, OFFSET> {
   |                   ^^^^
--
>> warning: struct `CListIter` is never constructed
   --> rust/kernel/clist.rs:260:19
   |
   260 | pub(crate) struct CListIter<'a, T, const OFFSET: usize> {
   |                   ^^^^^^^^^

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

                 reply	other threads:[~2026-01-25  1:08 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=202601250810.q4eMSFkF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=joelagnelf@nvidia.com \
    --cc=llvm@lists.linux.dev \
    --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 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.