Search Linux Wireless

Re: [PATCH v2] PCI/PM: enable runtime PM later during device scanning

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

 



On Mon, Jun 05, 2023 at 08:35:45PM +0200, Johannes Berg wrote:
> v2: use pm_runtime_get_noresume()/pm_runtime_put_noidle()
>     instead as advised by Rafael

You've changed the code but seemingly did not update the commit
message and code comment.  Technically you're not "allowing"
runtime PM, you just stop keeping the device runtime active.

A more fitting subject might thus be:

PCI/PM: Keep devices runtime active during enumeration


> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -1278,6 +1278,9 @@ static int pci_pm_runtime_suspend(struct device *dev)
>  	pci_power_t prev = pci_dev->current_state;
>  	int error;
>  
> +	if (WARN_ON(!pci_dev_is_added(pci_dev)))
> +		return -EBUSY;
> +

If this can't happen (as the commit message says), why warn?

Thanks,

Lukas



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux