Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6148062rwd; Mon, 5 Jun 2023 13:54:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43Q3e3erIX6ei3m+Ha47zs+SN2J3XqKT+G/9ti0+Rs4mwlg55AtMf+24hYAtD6JUcXMZ89 X-Received: by 2002:a05:6a21:9995:b0:114:7239:6a5e with SMTP id ve21-20020a056a21999500b0011472396a5emr333808pzb.10.1685998453216; Mon, 05 Jun 2023 13:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685998453; cv=none; d=google.com; s=arc-20160816; b=eNBd93IrLaGmO+8n4Po/bd6ivASwYKBCE/hNk9iqXLwedp+D67tCBQMcU95GnIYc/Y vxi6dOqSmhQ2RPvvAtgmIk5CHxHig29SVW6idBg39bDl+jYMvjBVkcsJqke/UYcVIpnq UaALKZ+j3AtocFqoNj4YKYDoC166X2UAB7xJlN5p77pR26h6RvPSYKZxR91lRSMess/x Vb0R8x6ZcG0ZouHRrnl39kwFYeOMMygxOUrDHcMHMbhbLTCG2DQpH4p2knll/ENIS6la pAnMwoqqExskYaCbFamnEYVEsLuE8h3Bn3JVM+FoCPCSask4Uu3LrHwgclFQ9tgMeo5J ndeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jP5V4ts6yFhIGGcTM49u357AIr+st52m9Niqgbu0Ltw=; b=Q053sYuyU3wpSNwqn8hm3G1SKsppg8z/RHdZq+9wmvhJ/QE8g5PDeclXAPR0AxhICV m9+R5wYw0Jhg2XgfbNFmTES1jiwJm9tRelpZI/5gA0tsaMoj8Xutn87CKncUak8iT5kg 7ZnAOVrbv0hsx5apGHYAr3UtMxmKb7+z1hN/U85InJiPzNgxwqKvWDi+9pgW2k9eYHNk 0/F4KF/QIVSPE3I8MUKCQY8K6wFFJSpOUO/ag29NrIWWWc7ujyR9oaErh6uOtqFXvGqf sRszMhd8kt9d7/rd7NhUOj0sHOHf0wdMreNbQ0+p5YKYOtGIPIQG+DFWzGMFrUo9WAee 8x1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a637352000000b0053f23ffad1csi5985608pgn.544.2023.06.05.13.54.02; Mon, 05 Jun 2023 13:54:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233476AbjFEUuW (ORCPT + 63 others); 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) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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