Re: [PATCH v4 7/9] PCI: Make pci_match_one_device() match on ID instead of device

"Gary Guo" <[email protected]> Sat, 25 Jul 2026 13:17:50 +0100
Newsgroups gmane.linux.kernel.pci,gmane.linux.kernel,gmane.linux.ide,gmane.linux.scsi,gmane.linux.kernel.ipack,gmane.linux.network,gmane.comp.video.dri.devel
Message-ID <[email protected]>
On Fri Jul 24, 2026 at 11:29 PM BST, Bjorn Helgaas wrote:
> On Thu, Jul 23, 2026 at 11:00:46PM +0100, Gary Guo wrote:
>> PCI dynamic ID needs to match IDs against a new ID to see if it already
>> exists. Existing APIs can only match IDs against devices, causing the
>> dynamic ID insertion code to create a temporary device only for matching
>> purpose. Rename pci_match_one_device() to pci_match_one_id() so it can b=
e
>> used for this purpose instead; add a pci_id_from_device() helper to make=
 it
>> easy to convert users.
>
> s/causing the ... code to create/so the ... code creates/
> s/purpose/purposes/
>
>> Similarly, convert pci_match_id() to do_pci_match_id(). But keep the
>> existing API because there are many users.
>>=20
>> Reviewed-by: Danilo Krummrich <[email protected]>
>> Signed-off-by: Gary Guo <[email protected]>
>
> Reviewed-by: Bjorn Helgaas <[email protected]>
> Acked-by: Bjorn Helgaas <[email protected]>
>
> What's the merge strategy?  If these all need to be merged together,
> feel free to include the PCI patches whereever you merge the series.

I think the series should be merged together, as I consider the driver chan=
ges
included in this series being "fixing the users".

The series should probably be taken via the PCI tree. I suppose one can als=
o
argue that the lifetime issue with device IDs isn't unique to PCI bus so th=
is
can also be considered driver-core material, but given that Greg has alread=
y
taken the USB fixes via the USB tree the only unfixed bus left is PCI.

So unless Danilo thinks otherwise I'd suggest the series be taken as a whol=
e via
PCI.

Best,
Gary

>
>> ---
>>  drivers/pci/pci-driver.c | 38 ++++++++++++++++++++++++++++----------
>>  drivers/pci/pci.h        | 43 +++++++++++++++++++++++++++++++----------=