From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3A06311979 for ; Mon, 5 Jan 2026 08:10:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767600640; cv=none; b=G09qRDUnBTWXIDyDZp6Qm3WedHUAXhnqi1dKPOf4KVX4fkGdDpUKWrCyF7o3ve1NBMQueNoBIT1jkwkhSGKYifqUyr2Asr8okTrbhrnQ7sqjU/EvfiYXBQDwLLjlltrtfrxfZgwoU46XsJKjEgECEx1vlXkIhuiEYeiO85WY7NY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767600640; c=relaxed/simple; bh=RXXt8awwSFKvIYuULPDTP5ly+vfpPmoW/YiHxyCGXU8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WIKnhIkUwSGcIdKoyBWOss8taijGvWD109fM//qWMIIUPVEZp+UYGd/wVxdkI7xOU9Fzs/5YDjMuq+T7rFNXfMCEiuZxER29WQiqgcph1B+y2vl1bhkO3s6+e5mAlFfjMQd/MgGMwduTJK+tte5MpsPxt6CgTjg/YMY5rkZTfSc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DgvFIblC; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DgvFIblC" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-8bc53dae8c2so2116094785a.2 for ; Mon, 05 Jan 2026 00:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767600637; x=1768205437; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=Or/cXZmh9MtTld9m1B9ORzue6F9gk9B51XzjBDT3vHo=; b=DgvFIblCdsJ3mYrRVjwutxzreczs/Uo6yvoKdsq/Ue6HBA90rNDi10bSosFv2049T3 CGNktlzMRjSw7BoEn/m2N6BUOdno0y7Nr/TK1tRScKPcGqCDbonFUamp/tZ9Ah/fcACq ldGZMg+VuNQCN4ocDuEocxZG7IXkJiRIR/tjDKhzU/ThTlp6B8pD/md5jy/UygP/5HL3 pYrQqGKBPvSaEEh93fo3JXqvSKYxNKqWL3TlRWQPO8054BI9EQeKANuz2TChDSerFGzr xgBMSDxvKwYFKLBOHG7hWMYiX00ZmiAMYZAmAqpFInHeDCk6q7PDe1US2dwyEdpixW1+ rUHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767600637; x=1768205437; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Or/cXZmh9MtTld9m1B9ORzue6F9gk9B51XzjBDT3vHo=; b=BHRyyp2LVl+c9grPCranzOYeJyjas1WDArUrqRCkNK75aJgO/ObJvMn1CdDjIxIqKm QkggCQVjY3r3jADtWbDGRP9VwmtoPNK6/97idpmDL97QnwrwPO9BvcSaJ5cRiVRbZtq+ RQhTr5q6IOKYKLgoQ1DX53ql/6iEz5S+tGKfuTGVavOcESlrs9K3DYXz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f7:9586 with SMTP id af79cd13be357-8c08fd041c2mr7415266985a.64.1767593341154; Sun, 04 Jan 2026 22:09:01 -0800 (PST) Received: from fauth-a2-smtp.messagingengine.com (fauth-a2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8c0970f5fe5sm3707510885a.26.2026.01.04.22.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jan 2026 22:09:00 -0800 (PST) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfauth.phl.internal (Postfix) with ESMTP id 06A14F40068; Mon, 5 Jan 2026 01:09:00 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 05 Jan 2026 01:09:00 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdelieehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhquhhnucfh vghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrthhtvg hrnhephfetvdfgtdeukedvkeeiteeiteejieehvdetheduudejvdektdekfeegvddvhedt necuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghr shhonhgrlhhithihqdeiledvgeehtdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvg hngheppehgmhgrihhlrdgtohhmsehfihigmhgvrdhnrghmvgdpnhgspghrtghpthhtohep vddtpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegurghkrheskhgvrhhnvghlrd horhhgpdhrtghpthhtohepsghhvghlghgrrghssehgohhoghhlvgdrtghomhdprhgtphht thhopehojhgvuggrsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehgrghrhiesghgrrh ihghhuohdrnhgvthdprhgtphhtthhopegsjhhorhhnfegpghhhsehprhhothhonhhmrghi lhdrtghomhdprhgtphhtthhopehlohhsshhinheskhgvrhhnvghlrdhorhhgpdhrtghpth htoheprgdrhhhinhgusghorhhgsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrlhhi tggvrhihhhhlsehgohhoghhlvgdrtghomhdprhgtphhtthhopehtmhhgrhhoshhssehumh hitghhrdgvughu X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Jan 2026 01:08:59 -0500 (EST) Date: Mon, 5 Jan 2026 14:08:57 +0800 From: Boqun Feng To: Danilo Krummrich , Bjorn Helgaas , Miguel Ojeda Cc: Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Joel Fernandes , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, Dirk Behme , FUJITA Tomonori , kernel test robot , Liang Jie , Drew Fustini , David Gow Subject: Re: [PATCH v2] PCI: Provide pci_free_irq_vectors() for CONFIG_PCI=n Message-ID: References: <20251226113938.52145-1-boqun.feng@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251226113938.52145-1-boqun.feng@gmail.com> On Fri, Dec 26, 2025 at 07:39:38PM +0800, Boqun Feng 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. > Ping ;-) Bjorn, would it be possible to take via pci tree? Thanks! Regards, Boqun > Reported-by: FUJITA Tomonori > Closes: https://lore.kernel.org/rust-for-linux/20251209014312.575940-1-fujita.tomonori@gmail.com/ > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202512220740.4Kexm4dW-lkp@intel.com/ > Reported-by: Liang Jie > Closes: https://lore.kernel.org/rust-for-linux/20251222034415.1384223-1-buaajxlj@163.com/ > Fixes: 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI is disabled") > Reviewed-by: Drew Fustini > Reviewed-by: David Gow > Reviewed-by: Joel Fernandes > Reviewed-by: Danilo Krummrich > Signed-off-by: Boqun Feng > --- > v1 --> v2: > > * Add Reported-by from FUJITA Tomonori, kernel test robot and Liang Jie. > * Add Reviewed-by tags. > > Thanks! > > Liang Jie, I added you as Reported-by because of [1], if you prefer not > to have that tag, feel free to let me know, thanks! > > [1]: https://lore.kernel.org/rust-for-linux/20251222034415.1384223-1-buaajxlj@163.com/ > > include/linux/pci.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 864775651c6f..b5cc0c2b9906 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -2210,6 +2210,10 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, > { > return -ENOSPC; > } > + > +static inline void pci_free_irq_vectors(struct pci_dev *dev) > +{ > +} > #endif /* CONFIG_PCI */ > > /* Include architecture-dependent settings and functions */ > -- > 2.51.0 >