Re: [PATCH 2/2] PCI: PM: Replace pci_dev_keep_suspended() with two functions

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

 



On Fri, Jun 07, 2019 at 12:32:31AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> 
> The code in pci_dev_keep_suspended() is relatively hard to follow due
> to the negative checks in it and in its callers and the function has
> a possible side-effect (disabling the PME) which doesn't really match
> its role.
> 
> For this reason, move the PME disablig from pci_dev_keep_suspended()
                                ^^^^^^^^
disabling

> to a separate function and change the semantics (and name) of the
> rest of it, so that 'true' is returned when the device needs to be
> resumed (and not the other way around).  Change the callers of
> pci_dev_keep_suspended() accordingly.
> 
> While at it, make the code flow in pci_pm_poweroff() reflect the
> pci_pm_suspend() more closely to avoid arbitrary differences between
> them.
> 
> This is a cosmetic change with no intention to alter behavior.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux