From: Pavel Machek <pavel@ucw.cz>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: [RFC 2/3] Runtime PM support for named power states
Date: Sun, 2 Oct 2005 22:41:42 +0200 [thread overview]
Message-ID: <20051002204142.GB2239@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0509301616200.4470-100000@iolanthe.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]
Hi!
> Index: usb-2.6/drivers/pci/probe.c
> ===================================================================
> --- usb-2.6.orig/drivers/pci/probe.c
> +++ usb-2.6/drivers/pci/probe.c
> @@ -22,6 +22,54 @@ EXPORT_SYMBOL(pci_root_buses);
>
> LIST_HEAD(pci_devices);
>
> +const char pci_name_D0[] = "D0";
> +const char pci_name_D1[] = "D1";
> +const char pci_name_D2[] = "D2";
> +const char pci_name_D3[] = "D3";
Why not "D3hot"? And what about "D3cold"?
> +/**
> + * pci_state_to_name -- return a static name string for a power state
> + * @state: power state to convert
> + */
> +const char *pci_state_to_name(pci_power_t state)
> +{
> + static const char *(names[]) = {
> + pci_name_D0, pci_name_D1, pci_name_D2,
> + "D3hot", "D3cold", "Unknown"};
} should go on separate line.
> + int i = (int __force) state;
> +
> + if (i < 0 || i >= sizeof(names) / sizeof(names[0]))
> + return "Error";
Why the "Unknown" in the array, then?
> @@ -109,6 +117,7 @@ struct pci_dev {
> pci_power_t current_state; /* Current operating state. In ACPI-speak,
> this is D0-D3, D0 being fully functional,
> and D3 being off. */
> + const char *(states[5]); /* Names for supported states */
That constant looks strange here...
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2005-10-02 20:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-30 20:27 [RFC 2/3] Runtime PM support for named power states Alan Stern
2005-10-02 20:41 ` Pavel Machek [this message]
2005-10-03 15:19 ` Alan Stern
2005-10-03 18:14 ` David Brownell
2005-10-03 19:19 ` Alan Stern
2005-10-03 19:43 ` David Brownell
2005-10-03 20:09 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051002204142.GB2239@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-pm@lists.osdl.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox