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

Jason Gunthorpe
2026-03-30T13:11:34Z

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@hotmail.com>
> ---
> drivers/pci/pci.c | 46 ++++++++++++++++++++++++----------------------
> 1 file changed, 24 insertions(+), 22 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason