Re: [PATCH] PCI PM: Restore standard config registers of all devices early (was: Re: EeePC resume failure - timers)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 16 January 2009, Linus Torvalds wrote:
> 
> On Fri, 16 Jan 2009, Rafael J. Wysocki wrote:
> > 
> > So, does it mean the patch looks reasonable? ;-)
> 
> I haven't tested it myself, and I probably won't have time to before I 
> leave for LCA, but it looks reasonable. I'd suggest replacing this:
> 
> +               if (pci_dev->current_state != PCI_D0) {
> +                       /*
> +                        * Warn users if the driver puts the device into a low
> +                        * power state, but doesn't bother to save its config
> +                        * registers.
> +                        */
> +                       WARN_ON(true);
> +                       goto Fixup;
> 
> with the much simpler
> 
> 	if (WARN_ON_ONCE(pci_dev->current_state != PCI_D0))
> 		goto Fixup;
> 
> instead, because we don't want to get millions of warnings, and it's kind 
> of silly to have WARN_ON(true) inside a conditional code-sequence.

I'll do that, thanks.

Somehow, I didn't realize that WARN_ON_ONCE() returned !!(its argument).

Rafael
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux