diff mbox

[v1,1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages

Message ID 152791812599.257724.10989340037255897378.stgit@bhelgaas-glaptop.roam.corp.google.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Bjorn Helgaas June 2, 2018, 5:42 a.m. UTC
From: Bjorn Helgaas <bhelgaas@google.com>

Use dev_printk() for messages related to requesting control of SHPC hotplug
via the OSHP method.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/hotplug/acpi_pcihp.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

Comments

Mika Westerberg June 2, 2018, 6:48 p.m. UTC | #1
On Sat, Jun 02, 2018 at 12:42:06AM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> Use dev_printk() for messages related to requesting control of SHPC hotplug
> via the OSHP method.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Rafael J. Wysocki June 3, 2018, 7:58 a.m. UTC | #2
On Sat, Jun 2, 2018 at 7:42 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> Use dev_printk() for messages related to requesting control of SHPC hotplug
> via the OSHP method.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  drivers/pci/hotplug/acpi_pcihp.c |   13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c
> index 7cc50cfef9c6..597d22aeefc1 100644
> --- a/drivers/pci/hotplug/acpi_pcihp.c
> +++ b/drivers/pci/hotplug/acpi_pcihp.c
> @@ -96,7 +96,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
>         if (!handle) {
>                 /*
>                  * This hotplug controller was not listed in the ACPI name
> -                * space at all. Try to get acpi handle of parent pci bus.
> +                * space at all. Try to get ACPI handle of parent PCI bus.
>                  */
>                 struct pci_bus *pbus;
>                 for (pbus = pdev->bus; pbus; pbus = pbus->parent) {
> @@ -108,8 +108,8 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
>
>         while (handle) {
>                 acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
> -               dbg("Trying to get hotplug control for %s\n",
> -                   (char *)string.pointer);
> +               pci_info(pdev, "Requesting control of SHPC hotplug via OSHP (%s)\n",
> +                        (char *)string.pointer);
>                 status = acpi_run_oshp(handle);
>                 if (ACPI_SUCCESS(status))
>                         goto got_one;
> @@ -121,13 +121,12 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
>                         break;
>         }
>  no_control:
> -       dbg("Cannot get control of hotplug hardware for pci %s\n",
> -           pci_name(pdev));
> +       pci_info(pdev, "Cannot get control of SHPC hotplug\n");
>         kfree(string.pointer);
>         return -ENODEV;
>  got_one:
> -       dbg("Gained control for hotplug HW for pci %s (%s)\n",
> -           pci_name(pdev), (char *)string.pointer);
> +       pci_info(pdev, "Gained control of SHPC hotplug (%s)\n",
> +                (char *)string.pointer);
>         kfree(string.pointer);
>         return 0;
>  }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c
index 7cc50cfef9c6..597d22aeefc1 100644
--- a/drivers/pci/hotplug/acpi_pcihp.c
+++ b/drivers/pci/hotplug/acpi_pcihp.c
@@ -96,7 +96,7 @@  int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
 	if (!handle) {
 		/*
 		 * This hotplug controller was not listed in the ACPI name
-		 * space at all. Try to get acpi handle of parent pci bus.
+		 * space at all. Try to get ACPI handle of parent PCI bus.
 		 */
 		struct pci_bus *pbus;
 		for (pbus = pdev->bus; pbus; pbus = pbus->parent) {
@@ -108,8 +108,8 @@  int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
 
 	while (handle) {
 		acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
-		dbg("Trying to get hotplug control for %s\n",
-		    (char *)string.pointer);
+		pci_info(pdev, "Requesting control of SHPC hotplug via OSHP (%s)\n",
+			 (char *)string.pointer);
 		status = acpi_run_oshp(handle);
 		if (ACPI_SUCCESS(status))
 			goto got_one;
@@ -121,13 +121,12 @@  int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
 			break;
 	}
 no_control:
-	dbg("Cannot get control of hotplug hardware for pci %s\n",
-	    pci_name(pdev));
+	pci_info(pdev, "Cannot get control of SHPC hotplug\n");
 	kfree(string.pointer);
 	return -ENODEV;
 got_one:
-	dbg("Gained control for hotplug HW for pci %s (%s)\n",
-	    pci_name(pdev), (char *)string.pointer);
+	pci_info(pdev, "Gained control of SHPC hotplug (%s)\n",
+		 (char *)string.pointer);
 	kfree(string.pointer);
 	return 0;
 }