Skip to contentSkip to conversation

PCI: use pr_warn_once for ACS parameter parse failure

PATCH Applied Richard Cheng 2 participants 2 messages Mar 12 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: use pr_warn_once for ACS parameter parse failure

When the ACS command line parameter cannot be parsed, the kernel skips applying the requested ACS override. This indicates an invalid boot parameter and should not be logged at informational level.

Use pr_warn_once() so the message is surfaced as a warning while still avoiding repeated log spam during device enumeration.

---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci.c +1 -1
index 13dbb405dc31..4e3b051c0f5f 100644
@@ -953,7 +953,7 @@ 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");
+			pr_warn_once("PCI: Can't parse ACS command line parameter\n");
 			break;
 		} else if (ret == 1) {
 			/* Found a match */
Signature · 1 line
2.51.0
#1 lore raw
Quoted 9 lines · Richard Cheng

When the ACS command line parameter cannot be parsed, the kernel skips applying the requested ACS override. This indicates an invalid boot parameter and should not be logged at informational level.

Use pr_warn_once() so the message is surfaced as a warning while still avoiding repeated log spam during device enumeration.

Applied to pci/misc for v7.1, thanks!

Quoted 21 lines
---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci.c +1 -1
index 13dbb405dc31..4e3b051c0f5f 100644
@@ -953,7 +953,7 @@ 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");
+			pr_warn_once("PCI: Can't parse ACS command line parameter\n");
 			break;
 		} else if (ret == 1) {
 			/* Found a match */
Signature · 1 line
2.51.0