lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAErSpo4EHK5SEiAquguFV9sZa2-+q2jrF64JeBZqKBjaULNsRQ@mail.gmail.com>
Date:	Wed, 15 Aug 2012 13:17:43 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Len Brown <lenb@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	linux-pci@...r.kernel.org,
	ACPI Devel Mailing List <linux-acpi@...r.kernel.org>
Subject: Re: [Resend][PATCH] PCI / PM: Fix messages printed by acpi_pci_set_power_state()

On Sat, Aug 4, 2012 at 3:27 PM, Rafael J. Wysocki <rjw@...k.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@...k.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;
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ