Re: [PATCH] x86/PCI/ACPI: Replace printk calls with pr_info/pr_warn calls
From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2021-10-14 15:52:39
Also in:
linux-pci, lkml
On Thu, Oct 14, 2021 at 5:40 PM Hans de Goede [off-list ref] wrote:
The direct use of printk is deprecated, replace the printk calls in arch/x86/pci/acpi.c with pr_info/pr_warn calls. Signed-off-by: Hans de Goede <redacted>
Acked-by: Rafael J. Wysocki <redacted>
--- Note this applies on top of my: "x86/PCI: Ignore E820 reservations for bridge windows on newer systems" patch and was requested by several people during review of that patch.
I would send it as a [2/2] in the same series then, but ...
quoted hunk ↗ jump to hunk
--- arch/x86/pci/acpi.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 4537e3561c91..98fbdf4fa698 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c@@ -1,4 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 + +#define pr_fmt(fmt) "PCI: " fmt + #include <linux/pci.h> #include <linux/acpi.h> #include <linux/init.h>@@ -38,7 +41,7 @@ static int __init set_nouse_crs(const struct dmi_system_id *id) static int __init set_ignore_seg(const struct dmi_system_id *id) { - printk(KERN_INFO "PCI: %s detected: ignoring ACPI _SEG\n", id->ident); + pr_info("%s detected: ignoring ACPI _SEG\n", id->ident); pci_ignore_seg = true; return 0; }@@ -158,10 +161,9 @@ void __init pci_acpi_crs_quirks(void) else if (pci_probe & PCI_USE__CRS) pci_use_crs = true; - printk(KERN_INFO "PCI: %s host bridge windows from ACPI; " - "if necessary, use \"pci=%s\" and report a bug\n", - pci_use_crs ? "Using" : "Ignoring", - pci_use_crs ? "nocrs" : "use_crs"); + pr_info("%s host bridge windows from ACPI; if necessary, use \"pci=%s\" and report a bug\n", + pci_use_crs ? "Using" : "Ignoring", + pci_use_crs ? "nocrs" : "use_crs"); /* * Some BIOS-es contain a bug where they add addresses which map to@@ -189,8 +191,8 @@ void __init pci_acpi_crs_quirks(void) else if (pci_probe & PCI_USE_E820) pci_use_e820 = true; - printk(KERN_INFO "PCI: %s E820 reservations for host bridge windows\n", - pci_use_e820 ? "Honoring" : "Ignoring"); + pr_info("%s E820 reservations for host bridge windows\n", + pci_use_e820 ? "Honoring" : "Ignoring"); } #ifdef CONFIG_PCI_MMCONFIG@@ -365,9 +367,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) root->segment = domain = 0; if (domain && !pci_domains_supported) { - printk(KERN_WARNING "pci_bus %04x:%02x: " - "ignored (multiple domains not supported)\n", - domain, busnum); + pr_warn("pci_bus %04x:%02x: ignored (multiple domains not supported)\n", + domain, busnum); return NULL; }@@ -435,7 +436,7 @@ int __init pci_acpi_init(void) if (acpi_noirq) return -ENODEV; - printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n"); + pr_info("Using ACPI for IRQ routing\n"); acpi_irq_penalty_init(); pcibios_enable_irq = acpi_pci_irq_enable; pcibios_disable_irq = acpi_pci_irq_disable;@@ -447,7 +448,7 @@ int __init pci_acpi_init(void) * also do it here in case there are still broken drivers that * don't use pci_enable_device(). */ - printk(KERN_INFO "PCI: Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n"); + pr_info("Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n"); for_each_pci_dev(dev) acpi_pci_irq_enable(dev); } --2.31.1