mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miguel Ojeda <ojeda@kernel.org>
To: ecourtney@nvidia.com
Cc: acourbot@nvidia.com, aliceryhl@google.com, apopple@nvidia.com,
	bhelgaas@google.com, dakr@kernel.org,
	daniel.almeida@collabora.com, driver-core@lists.linux.dev,
	jhubbard@nvidia.com, joelagnelf@nvidia.com,
	kwilczynski@kernel.org, linux-kernel@vger.kernel.org,
	nova-gpu@lists.linux.dev, ojeda@kernel.org,
	rust-for-linux@vger.kernel.org, ttabi@nvidia.com
Subject: Re: [PATCH] rust: pci: add resource_flags accessor
Date: Fri, 23 Oct 2026 17:40:05 +0200	[thread overview]
Message-ID: <20261023154005.95904-1-ojeda@kernel.org> (raw)
In-Reply-To: <20260908-pci-resource-flags-v1-1-269f29f81de6@nvidia.com>

On Tue, 08 Sep 2026 16:51:48 +0900 Eliot Courtney <ecourtney@nvidia.com> wrote:
>
> +    /// Wrap a raw `c_ulong` value returned by a C API into [`Flags`].
> +    pub(crate) const fn from_raw(value: c_ulong) -> Self {
> +        Flags(value)
> +    }

In linux-next (next-20261022), on UML x86_64, I am seeing:

    error: associated function `from_raw` is never used
       --> rust/kernel/io/resource.rs:240:25
        |
    216 | impl Flags {
        | ---------- associated function in this implementation
    ...
    240 |     pub(crate) const fn from_raw(value: c_ulong) -> Self {
        |                         ^^^^^^^^
        |
        = note: `-D dead-code` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(dead_code)]`

`kernel::io::resource` is always built, but the only user of `from_raw`
is under `CONFIG_PCI`.

I hope that helps.

Cheers,
Miguel

      parent reply	other threads:[~2026-10-23 15:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  7:51 Eliot Courtney
2026-09-11  9:53 ` Danilo Krummrich
2026-09-11 12:38 ` Alexandre Courbot
2026-09-11 14:13 ` Eliot Courtney
2026-10-23 15:40 ` Miguel Ojeda [this message]

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=20261023154005.95904-1-ojeda@kernel.org \
    --to=ojeda@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=ecourtney@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=joelagnelf@nvidia.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=ttabi@nvidia.com \
    /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®