* [Resend][PATCH] PCI / PM: Fix messages printed by acpi_pci_set_power_state()
@ 2012-08-04 21:27 Rafael J. Wysocki
2012-08-15 19:17 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2012-08-04 21:27 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Len Brown, LKML, Linux PM list, linux-pci, ACPI Devel Mailing List
If a PCI device is put into D3_cold by acpi_bus_set_power(),
the message printed by acpi_pci_set_power_state() says that its
power state has been changed to D4, which doesn't make sense.
In turn, if the device is put into D3_hot, the message simply
says "D3" without specifying the variant of the D3 state.
Fix this by using the pci_power_name() macro for printing the state
name instead of building it from the numeric value corresponding to
the given state directly.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/pci/pci-acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux/drivers/pci/pci-acpi.c
===================================================================
--- linux.orig/drivers/pci/pci-acpi.c
+++ linux/drivers/pci/pci-acpi.c
@@ -266,8 +266,8 @@ static int acpi_pci_set_power_state(stru
}
if (!error)
- dev_printk(KERN_INFO, &dev->dev,
- "power state changed by ACPI to D%d\n", state);
+ dev_info(&dev->dev, "power state changed by ACPI to %s\n",
+ pci_power_name(state));
return error;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Resend][PATCH] PCI / PM: Fix messages printed by acpi_pci_set_power_state()
2012-08-04 21:27 [Resend][PATCH] PCI / PM: Fix messages printed by acpi_pci_set_power_state() Rafael J. Wysocki
@ 2012-08-15 19:17 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2012-08-15 19:17 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Len Brown, LKML, Linux PM list, linux-pci, ACPI Devel Mailing List
On Sat, Aug 4, 2012 at 3:27 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
>
> If a PCI device is put into D3_cold by acpi_bus_set_power(),
> the message printed by acpi_pci_set_power_state() says that its
> power state has been changed to D4, which doesn't make sense.
> In turn, if the device is put into D3_hot, the message simply
> says "D3" without specifying the variant of the D3 state.
>
> Fix this by using the pci_power_name() macro for printing the state
> name instead of building it from the numeric value corresponding to
> the given state directly.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Applied to my for-linus branch, since this fixes a minor issue
introduced with the runtime D3cold support we merged for 3.6. Thanks!
> ---
> drivers/pci/pci-acpi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux/drivers/pci/pci-acpi.c
> ===================================================================
> --- linux.orig/drivers/pci/pci-acpi.c
> +++ linux/drivers/pci/pci-acpi.c
> @@ -266,8 +266,8 @@ static int acpi_pci_set_power_state(stru
> }
>
> if (!error)
> - dev_printk(KERN_INFO, &dev->dev,
> - "power state changed by ACPI to D%d\n", state);
> + dev_info(&dev->dev, "power state changed by ACPI to %s\n",
> + pci_power_name(state));
>
> return error;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-15 19:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-04 21:27 [Resend][PATCH] PCI / PM: Fix messages printed by acpi_pci_set_power_state() Rafael J. Wysocki
2012-08-15 19:17 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).