mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: miguel.ojeda.sandonis@gmail.com, dakr@kernel.org,
	bhelgaas@google.com, ojeda@kernel.org, gary@garyguo.net,
	bjorn3_gh@protonmail.com, lossin@kernel.org,
	a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
	joelagnelf@nvidia.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	Liang Jie <buaajxlj@163.com>
Subject: Re: [PATCH] PCI: Provide pci_free_irq_vectors() for CONFIG_PCI=n
Date: Thu, 25 Dec 2025 18:19:08 +0800	[thread overview]
Message-ID: <aU0PnCV69l7lV2aS@tardis-2.local> (raw)
In-Reply-To: <20251225.183631.866118259815088053.fujita.tomonori@gmail.com>

On Thu, Dec 25, 2025 at 06:36:31PM +0900, FUJITA Tomonori wrote:
> On Thu, 25 Dec 2025 10:10:04 +0100
> Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
> 
> > On Mon, Dec 15, 2025 at 3:54 AM Boqun Feng <boqun.feng@gmail.com> wrote:
> >>
> >> Commit 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI
> >> is disabled") fixed a build error by providing rust helpers when
> >> CONFIG_PCI_MSI=n. However the rust helpers rely on the
> >> pci_alloc_irq_vectors() function is defined, which is not true when
> >> CONFIG_PCI=n. There are multiple ways to fix this, e.g. a possible fix
> >> could be just remove the calling of pci_alloc_irq_vectors() since it's
> >> empty when CONFIG_PCI_MSI=n anyway. However, since PCI irq APIs, such as
> >> pci_alloc_irq_vectors(), are already defined even when CONFIG_PCI=n, the
> >> more reasonable fix is to define pci_alloc_irq_vectors() when
> >> CONFIG_PCI=n and this aligns with the situations of other primitives as
> >> well.
> >>
> >> Fixes: 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI is disabled")
> >> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > 
> > Related: https://lore.kernel.org/rust-for-linux/20251209014312.575940-1-fujita.tomonori@gmail.com/
> > 
> > I guess it counts as a report, so we may want a Reported-by (Cc'ing Tomo).
> 
> Since pci.rs is only compiled when CONFIG_PCI is enabled. So it seems
> consistent to treat the PCI helpers the same way. That said, this
> approach is also fine by me: it's already inconsistent that
> pci_alloc_irq_vectors() has a stuf definition, while
> pci_free_irq_vectors does not.

Yes, I think providing a stub pci_free_irq_vectors() is the way to go.
If you are OK with it, I could send a v2 with your and Liang Jie's
Reported-by. Alternatively, since you're the first one sending the fix,
and I would have replied that with the suggestion if I didn't miss that,
feel free to send a v2 (providing the stub pci_free_irq_vectors()) from
you ;-)

Regards,
Boqun

  reply	other threads:[~2025-12-25 10:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15  2:54 Boqun Feng
2025-12-16  9:13 ` Danilo Krummrich
2025-12-18  5:03 ` Drew Fustini
2025-12-19  8:33 ` David Gow
2025-12-19 14:59 ` Joel Fernandes
2025-12-25  9:10 ` Miguel Ojeda
2025-12-25  9:36   ` FUJITA Tomonori
2025-12-25 10:19     ` Boqun Feng [this message]
2025-12-26 11:11       ` FUJITA Tomonori
2025-12-25  9:37   ` Boqun Feng

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=aU0PnCV69l7lV2aS@tardis-2.local \
    --to=boqun.feng@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=buaajxlj@163.com \
    --cc=dakr@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=joelagnelf@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --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®