public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
To: Wei Wang <wei.w.wang@hotmail.com>
Cc: bhelgaas@google.com, jgg@nvidia.com, jonathan.cameron@huawei.com,
	 dan.carpenter@linaro.org, akpm@linux-foundation.org,
	bp@alien8.de, rdunlap@infradead.org,  alex@shazbot.org,
	kevin.tian@intel.com, linux-kernel@vger.kernel.org,
	 linux-pci@vger.kernel.org
Subject: Re: [PATCH v6 3/6] PCI: Consolidate delimiter handling into pci_dev_str_match()
Date: Mon, 4 May 2026 14:31:43 +0900	[thread overview]
Message-ID: <20260504052005.GA2312220@rocinante> (raw)
In-Reply-To: <SEZPR01MB4399FA7D597B0A619C6F9A7EDC44A@SEZPR01MB4399.apcprd01.prod.exchangelabs.com>

Hello,

> +not_found:
> +	if (ret < 0)
> +		pr_err("PCI: Can't parse parameter: %s\n", p);

Two issues here:

  - At this time, when this messages is to be shown, the p can be already
    at the NULL-terminator, as a result of parsing, so if the entire
    parameter is some garbage value, then it will show nothing in dmesg.

  - This new per_err() is not rate-limited, like the old messages were,
    so if the parameter is invalid or malformed, and you have... 30, or
    more on servers and serious hardware, devices in the system, then
    it will print for every single one of them.

Albeit, the second issue might not be an issue, and it might have been on
purpose.  However, I am not convinced it was.

> +	if (*p != ';' && *p != ',') {
> +		/*
> +		 * End of param or invalid format. Return -ENODEV so the caller
> +		 * stops parsing.
> +		 */
> +		return -ENODEV;
> +	}

[...]
> @@ -943,18 +960,11 @@ static void __pci_config_acs(struct pci_dev *dev, struct pci_acs *caps,
>  
>  		ret = pci_dev_str_match(dev, p, &p);
>  		if (ret < 0) {
> -			pr_info_once("PCI: Can't parse ACS command line parameter\n");


[...]
> @@ -6392,16 +6402,8 @@ static resource_size_t pci_specified_resource_alignment(struct pci_dev *dev,
>  			align = 1ULL << align_order;
>  			break;
>  		} else if (ret < 0) {
> -			pr_err("PCI: Can't parse resource_alignment parameter: %s\n",
> -			       p);

For the two above - it was nice to have the information about which
parameter to what kernel boot option was actually causing issues.  The
new code will only print a generic message.

Thank you!

	Krzysztof

  parent reply	other threads:[~2026-05-04  5:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12  9:06 [PATCH v6 0/6] PCI: Add support for ACS Enhanced Capability Wei Wang
2026-03-12  9:06 ` [PATCH v6 1/6] PCI: Validate ACS enable flags against device-specific ACS capabilities Wei Wang
2026-03-30 13:09   ` Jason Gunthorpe
2026-03-12  9:06 ` [PATCH v6 2/6] Documentation/kernel-parameters: Add multi-device config_acs example Wei Wang
2026-03-30 13:10   ` Jason Gunthorpe
2026-03-12  9:06 ` [PATCH v6 3/6] PCI: Consolidate delimiter handling into pci_dev_str_match() Wei Wang
2026-03-30 13:11   ` Jason Gunthorpe
2026-05-04  5:31   ` Krzysztof Wilczyński [this message]
2026-03-12  9:06 ` [PATCH v6 4/6] PCI: Refactor disable_acs_redir and config_acs param handling Wei Wang
2026-03-12  9:06 ` [PATCH v6 5/6] PCI: Enable the enhanced ACS controls introduced by PCI_ACS_ECAP Wei Wang
2026-03-12  9:06 ` [PATCH v6 6/6] PCI: Add the enhanced ACS controls check to pci_acs_flags_enabled() Wei Wang
2026-03-30 13:21   ` Jason Gunthorpe
2026-03-12 10:59 ` [PATCH v6 0/6] PCI: Add support for ACS Enhanced Capability Wei Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260504052005.GA2312220@rocinante \
    --to=kwilczynski@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex@shazbot.org \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=dan.carpenter@linaro.org \
    --cc=jgg@nvidia.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=wei.w.wang@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox