Re: [PATCH v6 3/6] PCI: Consolidate delimiter handling into pci_dev_str_match()

From: Jason Gunthorpe

Date: Mon Mar 30 2026 - 09:11:58 EST


On Thu, Mar 12, 2026 at 05:06:34PM +0800, Wei Wang wrote:
> Callers of pci_dev_str_match() manually checked for the ';' or ','
> delimiter and advanced the parameter pointer past it. Move this common
> logic into pci_dev_str_match() so callers no longer need to duplicate it.
>
> When no delimiter is found (end of parameter list or malformed entry),
> pci_dev_str_match() now returns -ENODEV to indicate that no further entries
> can be parsed, preserving the previous caller behavior of stopping parsing.
>
> Signed-off-by: Wei Wang <wei.w.wang@xxxxxxxxxxx>
> ---
> drivers/pci/pci.c | 46 ++++++++++++++++++++++++----------------------
> 1 file changed, 24 insertions(+), 22 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason