Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753608Ab3FNRJH (ORCPT ); Fri, 14 Jun 2013 13:09:07 -0400 Received: from mail-oa0-f53.google.com ([209.85.219.53]:38367 "EHLO mail-oa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753387Ab3FNRJF (ORCPT ); Fri, 14 Jun 2013 13:09:05 -0400 MIME-Version: 1.0 In-Reply-To: <2491625.TQ1FFQeR38@vostro.rjw.lan> References: <2491625.TQ1FFQeR38@vostro.rjw.lan> From: Bjorn Helgaas Date: Fri, 14 Jun 2013 11:08:44 -0600 Message-ID: Subject: Re: [PATCH] PCI / ACPI / PM: Use correct power state strings in messages To: "Rafael J. Wysocki" Cc: LKML , Linux PCI , Linux PM list , ACPI Devel Maling List Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1650 Lines: 49 On Thu, Jun 13, 2013 at 4:29 PM, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Make acpi_pci_set_power_state() print the name of the ACPI device > power state the device has been actually put into instead of printing > the name of the requested PCI device power state, which need not be > the same. > > Signed-off-by: Rafael J. Wysocki > --- > > For 3.11. > > Thanks, > Rafael > > --- > drivers/pci/pci-acpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-pm/drivers/pci/pci-acpi.c > =================================================================== > --- linux-pm.orig/drivers/pci/pci-acpi.c > +++ linux-pm/drivers/pci/pci-acpi.c > @@ -211,7 +211,7 @@ static int acpi_pci_set_power_state(stru > > if (!error) > dev_info(&dev->dev, "power state changed by ACPI to %s\n", > - pci_power_name(state)); > + acpi_power_state_string(state_conv[state])); > > return error; > } > Just to double-check this, it *looks* like the effective change is that for PCI_D3hot and PCI_D3cold, we'll print "(unknown)" instead of "D3hot" and "D3cold" because state_conv[] folds both PCI_D3hot and PCI_D3cold into ACPI_STATE_D3, and acpi_power_state_string() doesn't have a case for ACPI_STATE_D3. Is that what you intended? Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/