From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C7EEC7EE23 for ; Mon, 5 Jun 2023 20:50:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231714AbjFEUuW (ORCPT ); Mon, 5 Jun 2023 16:50:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjFEUuW (ORCPT ); Mon, 5 Jun 2023 16:50:22 -0400 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5f64:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 785D4FD; Mon, 5 Jun 2023 13:50:19 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 9D300300000BE; Mon, 5 Jun 2023 22:50:17 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 93CF3350DC0; Mon, 5 Jun 2023 22:50:17 +0200 (CEST) Date: Mon, 5 Jun 2023 22:50:17 +0200 From: Lukas Wunner To: Johannes Berg Cc: linux-wireless@vger.kernel.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, rafael@kernel.org, Bjorn Helgaas , Johannes Berg Subject: Re: [PATCH v2] PCI/PM: enable runtime PM later during device scanning Message-ID: <20230605205017.GA23596@wunner.de> References: <20230605121621.4259f1be6cd2.Idbaa55b93f780838af44ebccb84c36f60716df04@changeid> <20230605203519.bc4232207449.Idbaa55b93f780838af44ebccb84c36f60716df04@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230605203519.bc4232207449.Idbaa55b93f780838af44ebccb84c36f60716df04@changeid> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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