From nobody Sat Feb 7 07:24:42 2026 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 329571B4244 for ; Fri, 26 Dec 2025 11:39:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766749186; cv=none; b=HViTJvEVArnEuORjAXyng/qMH/LnlZMZ0R5kNlW5Y83tfy6h1yaRa2SSciy1mwANLwW44CBgsKoFOt1L/EIHol9uyUxyieBiKjUixy9vgbq8QLdjkT5AuZQCy64giHkRsDYSNC6FJh5PBlULC2oF/g/AkmdfIzi4KKpBBd6xI3E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766749186; c=relaxed/simple; bh=ejONzTVU0FdmdyDekUr8YEFyQevob5Y9vbn53RBZ8Eo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GdteknZsDlqK4IP7SKsot82zDcITfZHpF56vG7fOv+kIkooeNi/n4tI8TAUfwod+culdCaRBgK6Hqv7Ny/CIKf1B5fx67GgOuy8ZNXoua1fiTvL1XKqICQDSOVl4KSngoNXVVlscKU3voZxZtqeU6uiOQzuAQm7QcJRZ0/IZkNQ= 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=ICeUjw+w; arc=none smtp.client-ip=209.85.219.49 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="ICeUjw+w" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-8888a1c50e8so94482626d6.0 for ; Fri, 26 Dec 2025 03:39:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766749184; x=1767353984; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:feedback-id:from:to:cc:subject:date:message-id:reply-to; bh=tmKT01VlgiVDtYWOF8z6L//YBXMRlOGnlMxAj6FU8N0=; b=ICeUjw+w5OHQskyKx9agrJ3n5nKEj0nAFhrkZVXcZWgyL48hqGQcm4pcvtWjlJThmq 8zuT/rHWdvHzuWoWIU8aCFLuXDk8uWvBFwNLxGQH65VcT3dqlYJjhJVFmzTA0GwetecK lgWhjTlP1sU4nP7EFIuQ/OxkxBufyOyiwDe27F+nL9Oz7Zq7nyz2CaxdxQIw8MstYiDm euw1kx6Rl1lQc3oy9Be0mmJ3WcvSdY5ZpRDGdlelsRzRInQAV3XN3z4q3lYVw5qs1ftE mZTW3AwglQ1VP3UBVzffCde64Q6GdiGX9qTbeSJJKsUUVfneSfZvaUhHCHRAiISaVDFk aIIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766749184; x=1767353984; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:feedback-id:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=tmKT01VlgiVDtYWOF8z6L//YBXMRlOGnlMxAj6FU8N0=; b=fdFKWXhYdRwByxFcAcmiTl4EMZP8oDAV3mVSKAzbdz41ff9C1mzNWEcSmh8vtMMsWM lMzJ1kM0gWb5MqWK0+LiTrXzw0Jv9IUMz91MbgkrUIiYw1PtviAljBf4w2uICHD598fb Krwwb9i60LYfUOmF71Sbt2QFCS85pSy1GFMnsb/BrhwOA+DTSTMcbENZtEw800AazWvi 9k+ucMC6q6V2tC+JXtOci1LSnqp3PiOkmBWKtwSsDFVqVqiohuDO53vbTkMOSYD7JnIF dQs2ZM2kZmfqELsks7Dy57RGPaCt51gmJY5HJ3J/hPKMEYINPbzbwna9EaUgGHjXhmjB KPiQ== X-Forwarded-Encrypted: i=1; AJvYcCUQfOkdmKPxDktydL/muauW1QRr3BVqZD6S9SnHgACtGveoTIVkrZprZz+uApNCHFKBXWzTBGq6ZkMcTtM=@vger.kernel.org X-Gm-Message-State: AOJu0YwvoII3cymyBbFvowhQc79NMiVjftq1WNxLeREo6oVTdAjAZ5n0 8qR4PDeFRVYx4qpNu/YMQV1dsexoFqHBtgs3cHw6jiNHPwAUOBeichDY X-Gm-Gg: AY/fxX77MC2MP96ff4QahgUZPtC0n7W7PKPkQGUClkjrJLuZv+eWp0Azr9jzvAocIrC tr3WVx3KCsqiODWnQCDXndcDsu7Y0JzPMtkooL7U1zy0Uvu96HFsD1e+waJBTeD/dh8FuRwZSmm bo17lG9KMddsJNnfLz7YzAF7gWex0Ik0/uVwvhmgVlBkKQJhWVlPXHgSB20oK9QRCQVAs5S+fAn y+1SkgRkBl4YJPjyWyYGx4ddHcUlsfhiN6yvbsHinK2SWha5xjj4QrBpwfnWsUwx1aqWRISv9sD /TGo9u6oFNOwq3ppWYaX3pLpaYuRn2KxFGF3s23sxtUOdN6/BWSW7emYujrEjQ0szdO9Zp2Ja8O 4rEYV381jkw3FHzzUlT56ImRkU4jFxs2SX15UIy6vMmmOQVYSMBNcWBkxrbNTdque5zx2uLfgdG HrBjGVK7DAQgW6p8tRWppPelFqhGrifUtPNj/wfNnwTqxRRUjAGbjDt6xp1RBIHQmPCREt8fkZF EwcpXZ9zfddouk= X-Google-Smtp-Source: AGHT+IGV8BHHtX/GVo7I0/97UaUQUtAkvaXwseFZpyG4xX7ayE5yjIfCJ/90vxAgzY9uXJbR9su+2A== X-Received: by 2002:a05:6214:248b:b0:70f:a4b0:1eb8 with SMTP id 6a1803df08f44-88d8203f029mr371419736d6.13.1766749184014; Fri, 26 Dec 2025 03:39:44 -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 6a1803df08f44-88d96bec1d3sm165930696d6.17.2025.12.26.03.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Dec 2025 03:39:43 -0800 (PST) Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfauth.phl.internal (Postfix) with ESMTP id DB8BDF40068; Fri, 26 Dec 2025 06:39:42 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Fri, 26 Dec 2025 06:39:42 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeikeefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeeuohhquhhnucfhvghn ghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrthhtvghrnh epgeegueekgefhvedukedtveejhefhkeffveeufeduiedvleetledtkeehjefgieevnecu ffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshho nhgrlhhithihqdeiledvgeehtdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvghngh eppehgmhgrihhlrdgtohhmsehfihigmhgvrdhnrghmvgdpnhgspghrtghpthhtohepvddt pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegurghkrheskhgvrhhnvghlrdhorh hgpdhrtghpthhtohepsghhvghlghgrrghssehgohhoghhlvgdrtghomhdprhgtphhtthho pehojhgvuggrsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegsohhquhhnrdhfvghngh esghhmrghilhdrtghomhdprhgtphhtthhopehgrghrhiesghgrrhihghhuohdrnhgvthdp rhgtphhtthhopegsjhhorhhnfegpghhhsehprhhothhonhhmrghilhdrtghomhdprhgtph htthhopehlohhsshhinheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprgdrhhhinhgu sghorhhgsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrlhhitggvrhihhhhlsehgoh hoghhlvgdrtghomh X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Dec 2025 06:39:42 -0500 (EST) From: Boqun Feng To: Danilo Krummrich , Bjorn Helgaas , Miguel Ojeda Cc: Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , 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: [PATCH v2] PCI: Provide pci_free_irq_vectors() for CONFIG_PCI=n Date: Fri, 26 Dec 2025 19:39:38 +0800 Message-ID: <20251226113938.52145-1-boqun.feng@gmail.com> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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=3Dn. However the rust helpers rely on the pci_alloc_irq_vectors() function is defined, which is not true when CONFIG_PCI=3Dn. 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=3Dn anyway. However, since PCI irq APIs, such as pci_alloc_irq_vectors(), are already defined even when CONFIG_PCI=3Dn, the more reasonable fix is to define pci_alloc_irq_vectors() when CONFIG_PCI=3Dn and this aligns with the situations of other primitives as well. Reported-by: FUJITA Tomonori Closes: https://lore.kernel.org/rust-for-linux/20251209014312.575940-1-fuji= ta.tomonori@gmail.com/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202512220740.4Kexm4dW-lkp@int= el.com/ Reported-by: Liang Jie Closes: https://lore.kernel.org/rust-for-linux/20251222034415.1384223-1-bua= ajxlj@163.com/ Fixes: 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI is d= isabled") 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-buaajx= lj@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 */ =20 /* Include architecture-dependent settings and functions */ --=20 2.51.0